FAQ Database Discussion Community


adding watch for an editable row in angularjs

angularjs,watch,x-editable
I am using xeditable for editing a table row in angular js. HTML Code is shown below. <tr ng-repeat="expense in viewModel.expenses"> <td>{{expense.eid}}</td> <td><span editable-text="expense.billAmt" e-ng-model="editForm.billAmt" e-name="billAmt" e-form="rowform">{{expense.billAmt}}</span></td> <td><span ng-show="!rowform.$visible">{{expense.split}}</span><input type="text" ng-show="rowform.$visible" class="form-control input-sm" e-ng-model="editForm.split"...

Modify the output of the Select2 dropdown selection when used with jQuery X-Editable library

javascript,jquery,jquery-select2,x-editable
I have been trying to use X-Editable http://vitalets.github.io/x-editable/ with Select2 https://select2.github.io/ for weeks now without much luck. Originally I was trying to load in data from AJAX request and then use the library but all I could see if old code that supposedly worked with the older versions of both...

How to reference a value of an object by property?

angularjs,x-editable
I have an angularjs object like this: $scope.afterLogin = [ {value: 'customers|follow-ups', text: 'Follow Ups'}, {value: '', text: 'not set'} ]; I'm trying to use it with xeditable as follows: <span editable-select="user.default_module" e-ng-options="s.value as s.text for s in afterLogin" e-name="default_module" e-form="rowform">{{s[user.default_module] as s.text for s in afterLogin}}</span> What I am...

X-Editable bootstrap plugin “hidden” event issue on dynamically added elements

javascript,bootstrap,x-editable
I cannot get x-editable`s "hidden" event to work on dynamically added classes (or fields) via JS. I can manage it to work only if I add editable classes straight on HTML, but this approach is not suitable for me. What am I doing wrong? $.fn.editable.defaults.mode = "inline"; $.fn.editable.defaults.onblur = "submit";...

How to sanitize X-Editable value *before* editing?

javascript,twitter-bootstrap,sanitization,x-editable
I'm using X-Editable to give users the possibility to edit values inline. This works great, but I now want to use it for some money values which are localized in a "European way" (e.g.: € 12.000.000,00). When I click edit, I want the input to only contain 12000000 though. Is...

Datetime update goes wrong when using Bootstrap-Editable

php,html,mysql,datetime,x-editable
I'm trying to update a sql datetime. I just wana update the time and have some scripts for substr(). Now when i update the Hrs and min the day (d) get's reset to 1 in the first edit and 0 in a second edit. I'm using a html table generated...

X-Editable putting “Empty” after successful update

javascript,jquery,x-editable
I am using X-Editable plugin for inline editing on a table but I am getting a annoying problem. After the successful request and the successful updates, the plugin puts "Empty" instead the correct updated value on the table cell. My site is restful, so I am doing PUT requests to...

Add parameter to x-editable params

javascript,jquery,x-editable
x-editable has the option() method which is used to set a new option. params is one of the options and happens to be an object, and instead of replacing params with a new object, I just want to add a property to the existing params object. Below is my attempt,...

Parse Markdown into HTML in JavaScript X-Editable field

javascript,jquery,markdown,x-editable
I am using the jQuery X-Editable edit-in-place library on a field and the JavaScript Marked Markdown Parser library to try and convert Markdown strings into HTML. The goal is to show HTL and when it turns into a textarea edit field, to then how the Markdown. The Markdown will be...

X-Editable - Submit old value

ajax,bootstrap,x-editable
Well I'm using the X-Editable and wanted to know if it's possible to submit the new value and the old one. For instance, the field has "Portugal". Using the X-Editable inline I change it to "Spain". In the AJAX Request I want to send the primary key, the old and...

X-editable custom input with injected data and dropdowns

jquery,input,twitter-bootstrap-3,x-editable
I'm trying to go create a custom input for X-editable with select dropdowns which will be populated with data coming from the database that I somehow need to be able to inject into my custom input object. So, to narrow down the question, here is how I setup my custom...

Add confirm prompt before saving x-editiable

javascript,jquery,x-editable
How do I add a confirm prompt before saving x-editiable (http://vitalets.github.io/x-editable/)? If the response to the confirm prompt is negative, the x-editable dialog should close and the value should not be updated. I came up with this Fiddle, but the first solution is a little verbose and the second solution...

Angularjs xeditable typehead not updating the scope

javascript,angularjs,angular-ui-bootstrap,x-editable
Am using angular xeditable typehead directive to show autocomplete drop down. I am fetching data from a json file on page and using the jso array for e-typeahead. It is showing the matching values from array when I type something in input type. But when I select any value from...

How to use x-editable plugin with meanjs yeoman generated code?

angularjs,express,x-editable,meanjs,yeoman-generator-angular
I love x-editable plugin and have used previously for angular standalone application. Currently I've generated my project using Yeoman meanjs generators and I can't find the same options like for configuring editableOptions, the way I could do in angular app. Does anyone know where I can configure these settings? Is...

How to change x-editable event order?

javascript,angularjs,twitter-bootstrap,x-editable
I'm using angularJs and xeditables to create a web application. In this application, I have several xeditable text following each others and the validation is done when pressing enter or clicking outside: <div ng-repeat="answer in item.answers track by $index"> <input type="radio" name="{{item.label.text}}">&nbsp;<span editable-text="answer.text" onshow="onShow()" onhide="onClose()" buttons="no" blur="submit" onbeforesave="validateEditableText($data)">{{answer.text ||...

How can I change data-value in bootstrap editable element after it's changed?

jquery,twitter-bootstrap,x-editable
I'm using the bootstrap editable plugin to allow users to edit fields on the screen. One of the fields, when clicked, displays a small popup that lets users select from a dropdown with a checkmark next to the dropdown to allow the user to apply the value to the field....

Angularjs xeditable selected option not shown

angularjs,html-select,x-editable
I have editable rows in a table and I can't seem to show the selected value in my dropdown list. Everything else in the process works fine. Code at: http://jsfiddle.net/bzLj3a5q/7/ Html: ... <span editable-select="ad.ad_type_id" e-name="ad_type_id" e-form="rowform" e-ng-options="id as type for (id,type) in ad_types" onshow="showType(ad)"> {{ ad_types[ad.ad_type_id] }} </span> ... Controller:...

Bootstrap Editable - How to position DIV outside of table

jquery,twitter-bootstrap,x-editable
I am using editable in order to allow the user to make changes to the values inside of a table. The editable function works and I am able to edit the content within my table. My issue is that the editable function is inserting a DIV inside of my table....