jeditable

Jquery ui with Jeditable

雨燕双飞 提交于 2019-12-06 01:36:52
I am trying this code: <script type="text/javascript"> $(document).ready(function() { $('.edit').editable('http://www.example.com/save.php', { indicator : 'Saving...', tooltip : 'Click to edit...', submit : 'OK', cancel : 'Cancel', }); $('#cv_cd > input').autocomplete({ source: 'location.php', minLength: 2 }); }); </script> <div class="edit" id="cv_cd">Type</div> This code works properly with <inputs /> , but with jeditable, no request is sent off when i type something. After search the code with firebug, jeditable also creates an input field, however apparently something like this didn't

Is there a jQuery jEditable Multi-select plugin?

纵饮孤独 提交于 2019-12-05 23:15:45
I'm using the excellent jEditable plugin for some in-place editing on my page. There is one spot I need a multiple select element. Is there a jEditable plugin that allows me to do this? I've been trying to use the jEditable author's plugin API to create my own multiselect plugin, but no dice so far. There just doesn't seem to be quite enough documentation on what each function does in the API. And every single example plugin he provides appears to rely on other jQuery plugins. I just need a basic multiple select element... I made a small patch to Kalyan's suggestion that caused it not to work

jEditable submit on TAB as well as ENTER

戏子无情 提交于 2019-12-05 17:05:52
My jEditables work fine as long as the user hits ENTER to leave the input. If the user hits TAB, however, the changes are not posted. This is the correct and documented behavior. I'd like TAB to work just as ENTER does. I don't need to affect any other jEditables, just get the currently active one to post back as if ENTER had been hit. Is there any way to do this short of binding an keydown handler to the jEditable controls? If I do have to provide a keydown handler, is there any way to programmatically tell a jEditable control to post itself without extracting the id and value from the

Jeditable Async revert on error

假装没事ソ 提交于 2019-12-05 14:39:59
I have been using the JEditable plugin for JQuery and I would like to return errors to the plugin to instruct it to revert to the previous value and also display an error to the user. I have this working using a synchronous ajax call but I would prefer to use asynchronous callback instead. The code I have to far is below. $("#editbox").editable(submitEdit, { indicator : "Saving...", tooltip : "Click to edit...", name : "Editable.EmailAddress", id : "elementid", type : "text", submit : "<span class=\"mini_button\">Ok</span>", cssclass : "edit_text" }); function submitEdit(value, settings) { var

Using best_in_place with rich-text editor like TinyMCE

我们两清 提交于 2019-12-05 10:43:10
I'm using the best_in_place gem to do in-place editing in a Rails application. However, I need (X)HTML editing on some of the text areas, so I need a rich-text editor. TinyMCE is being used elsewhere on the site. However, it's not trivial to add an editor to best_in_place . To grossly oversimplify, the gem uses jQuery to insert the textarea tag on the fly, and TinyMCE initializes at page load, replacing available textarea s with an editor, so when best_in_place puts in its textarea , TinyMCE has already come and gone. I've tried re-initializing TinyMCE after best_in_place inserts its textarea,

How to Enable/Disable JEditable

我们两清 提交于 2019-12-05 06:14:52
问题 SOLUTION Thanks to Arman's P. proof of concept, finally got it to work with my site. CODE //Edit Note $(function(){ function makeEditable() { $(".edit").editable('ajax/save.php?editnotetext', { type : 'mce', submit : '<button class="save_button">Save</button>', event: 'dblclick', indicator : 'Saving...', tooltip : 'Doubleclick to edit...', onblur: 'ignore', width : '700px', height : '100px', callback : function(value, settings){ console.log('unlocked'); $.post('ajax/save.php?unlocknotetext',

Jeditable inserts extra spaces around the text in text area

放肆的年华 提交于 2019-12-05 05:13:06
Jeditable is inserting extra spaces around the actual text in a text area for me when I click to edit some text. How do I trim this or actually fix this? You can actually just pass a function to trim the string you are going to edit. Use this in your settings: data : function(string) {return $.trim(string)}, submit: "Save" Found the reason. And it is insane! In place edit will insert space around the text if you html looks like following <div id="inplace_edit_this"> This is some text that will be edited in-place. </div> And it will NOT insert space around the text if your html looks like this

Using jEditable with ASP.NET MVC (POSTing)

吃可爱长大的小学妹 提交于 2019-12-05 02:59:23
问题 I understand that with jEditable (http://www.appelsiini.net/projects/jeditable) you can do in-place editing and POST the changed information to a URL. My ASP.NET MVC view is displaying a bunch of Model information which I'd like to make in-place editable. Currently, I have two views - one text representation and one edit view in which a form is entirely POSTed and then my controller action takes the entire object (assembled from the form element names) as a parameter, updating the object and

jeditable dynamic target value

那年仲夏 提交于 2019-12-04 16:46:35
I'm using jeditable and it works really great! I'm just having some trouble figuring out how to dynamically change the target URL. jeditable is bound to a table of values that I want to edit inline. So I have: <td id="<%= col.id %>_<%= i.id %>" class="edit"> The id is a mashup of two values I need to know to edit this item on the server side. My js is: $(document).ready(function() { $('.edit').editable("/items/1", { id : "column_id_item_id", submitdata : function(value, settings){ return { data_template_id: '<%= @data_template.id%>}', format : 'json'} } , method : 'PUT', }); }); Note the

jEditable: Display Option Text (and not Value) after submit

╄→尐↘猪︶ㄣ 提交于 2019-12-04 13:19:14
I'm using jEditable on a Select list. It works beautifully, except for the following issue. jEditable displays in place whatever a server posts back after a submit. That works great for text boxes etc. where you can simply post the submitted value back from the server. However, this makes no sense on select lists because the value posted is simply the Id of an option element. If I post that back, then my text changes to the Id instead of the friendly text that was there before. How can I turn this behavior off? I don't want to have to fetch the text value using the submitted Id from from the