x-editable

How to use Angular-Xeditable's onBeforeSave / onAfterSave methods with more than $data as parameter

可紊 提交于 2019-11-30 03:18:18
问题 When first using Angular-Xeditable with my application, I ran into a problem trying to figure out how to save an x-editable change to an object that was accessed through an ng-repeat loop. The documentation primarily focuses on using onbeforesave and onaftersave for validation, and while it does show that it can be used to save things, the examples don't show how to pass anything more than $data (or $index) to your onbeforesave/onaftersave method. The samples show saving something like $scope

How do I use X-editable on dynamic fields in a Meteor template now with Blaze?

此生再无相见时 提交于 2019-11-29 15:14:00
问题 I had x-editable working in Meteor 0.7.2 but since upgrading to 0.8.0 it no longer renders correctly. I tend to end up with a bunch of Empty tags. This is frustrating because the data is there, just not by the time the rendered function is fired. <template name="clientPage"> <header>{{> clientPageTitleUpdate}}</header> </template> <template name="clientPageTitleUpdate"> <h1><span class="title-update editable" data-type="text" data-pk="{{_id}}" data-name="title" data-value="{{title}}">{{title}

X-editable custom field type not respecting overridden defaults

泄露秘密 提交于 2019-11-29 11:29:21
问题 I have a custom x-editable input type for entering a city and selecting a country that renders like so: Notice the buttons at the bottom; This is so because the initialization code contains showbuttons: 'bottom' : $('#location').editable({ url: '/post', title: 'Enter city and country', showbuttons: 'bottom', value: { city: "Napier", country: "nz" }, sourceCountry: [ {value: "af", text: "Afghanistan"}, ... {value: "zw", text: "Zimbabwe"} ] }); But for this widget it makes no sense to render

BootStrap之X-editable插件使用

走远了吗. 提交于 2019-11-28 22:29:33
项目背景 刚加入公司的新项目,主要在做开发工作。由于是新手,本周的工作是配合另外一个同事写前台页面。前台框架是Bootstrap,本文主要介绍一下项目需求的一个功能——表格行内编辑事件。 使用X-editable插件实现的。 效果图:点击表格就会出现下拉框。 步骤 1、jsp中添加引用 <link type= "text/css" href= "${ctx}/static/comp/jquery-ui-bootstrap/css/bootstrap-editable.css" rel= "stylesheet"> < script src= "${ctx}/static/comp/jquery-ui-bootstrap/js/bootstrap-editable.js" type= "text/javascript"> </ script> 2、在jsp中编写代码 1)表格数据如下: <c:forEach items= "${page.result}" var= "m" varStatus= "status"> < tr> < td columnName= "operator"> < a href= "#" class= "employee" value= "" data-pk= "operator" data-type= "select2">${m.employeeNo} </