NicolasCARPi / jquery_jeditable

jQuery edit in place plugin. Extendable via plugin architecture. Plugins for plugin. Really.
https://jeditable.elabftw.net
MIT License
1.74k stars 458 forks source link

Right Click, Double Click, Left Click ... all options to select from a Dropdown List #225

Closed kkaiser1952 closed 3 years ago

kkaiser1952 commented 3 years ago

I'm not sure this can be done but I was asked if a right click could toggle between two values. And if a double click would toggle between two other values, and left click display the entire dropdown list for selection. Currently my code looks like this;

$(".editable_selectACT").editable("save.php", {     // status
        data    : '{"In":"In","Out":"Out","In-Out":"In-Out","Leave?":"Leave?","Moved":"Moved","BRB":"BRB","Enroute":"Enroute","Assigned":"Assigned","MISSING":"MISSING"}',
        type    : "select",
        placeholder: "",
            onblur: 'submit',
            submit:"OK",
        callback: function() {refresh();},  //changes color of row immeditly
        tooltip : "Status dropdown",
        style   : "inherit"
        });
NicolasCARPi commented 3 years ago

Hello,

Yes this is probably possible, but possibly pretty involved and not so easy/straightforward to achieve.