Show Posts
|
Pages: 1 2 [3] 4 5 ... 13
|
33
|
General Category / EasyUI for jQuery / Re: Form check if anything is changed and reversed
|
on: May 30, 2022, 07:08:37 AM
|
Hi Jarry.
In between i found a solution, and it is similar to yours.
<form id="fmEditProfile" method="post" class="easyui-form" novalidate data-options=" onLoadSuccess: function() { $('#saveButton').linkbutton('disable'); origForm = $('#fmEditProfile').serialize(); }, onChange: function(target){ if ($(this).serialize() !== origForm) { $('#saveButton').linkbutton('enable'); } else { $('#saveButton').linkbutton('disable'); } }">
Thanks anyway
|
|
|
36
|
General Category / EasyUI for jQuery / [SOLVED]Form check if anything is changed or not
|
on: May 23, 2022, 12:53:41 AM
|
Hi.
The onChange event can be fired when an element is changed.
But how to "Unchange" when the user have written something in a textbox, and deleted it again.
What i want is, that when user change something the save button must be enabled, but also when user delete the change, the savebutton must disable again, as no change is done.
Jesper
|
|
|
37
|
General Category / EasyUI for jQuery / [SOLVED]Form onchange fire
|
on: May 23, 2022, 12:47:48 AM
|
Hi.
Have looked all around, and can't see anything about this.
In a form i have a textbox. When i add some text, the onChange is only fired when the textbox loose focus.
I want to enable a save button as soon the user writes some text.
Jesper
|
|
|
39
|
General Category / EasyUI for jQuery / [SOLVED]Dynamic mesage in validator
|
on: May 18, 2022, 03:04:57 PM
|
Hi.
Have this extended validType. It work fine, but i want having the message matching the 4 cases
Tried several things, but with no luck.
validType: 'passwordCheck[4,8]',
$.extend($.fn.validatebox.defaults.rules, { passwordCheck: { validator: function(value,param){ var checkType = parseInt(param[0]); var minChars = parseInt(param[1]); switch (checkType){ case 1: //Minimum [minChars] characters, at least one letter, lower or upper case : var patt = new RegExp("^(?=.*?[a-zA-Z]).{"+minChars+",}$") var res = patt.test(value) return res; break case 2: //Minimum [minChars] characters, at least one letter (lower/upper) and one number: var patt = new RegExp("^(?=.*?[a-zA-Z])(?=.*?[0-9]).{"+minChars+",}$") var res = patt.test(value) return res; break case 3: //Minimum [minChars] characters, at least one letter and one Upper case: var patt = new RegExp("^(?=.*?[a-z])(?=.*?[A-Z]).{"+minChars+",}$") var res = patt.test(value) return res; break case 4: //Minimum [minChars] characters, at least one letter and one Upper case and one number: var patt = new RegExp("^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?[0-9]).{"+minChars+",}$") var res = patt.test(value) return res; break } }, message: 'Minimum {1} characters, at least one letter, one Upper case and one number' } })
Regards Jesper
|
|
|
41
|
General Category / EasyUI for jQuery / Re: Datagrid dynamic column with formatter
|
on: May 11, 2022, 01:23:14 PM
|
Hi Jarry. I already have tried this, but it's not a valid json string. Try put it in jsonlint.com I do an ajax request to my DB and create the json response like this. jsonData = jsonData & chr(34) & "field" & chr(34) & ":" & chr(34) & rsData("COLUMN_NAME") & chr(34) & "," jsonData = jsonData & chr(34) & "title" & chr(34) & ":" & chr(34) & rsData("COLUMN_TITLE") & chr(34) & "," jsonData = jsonData & chr(34) & "sortable" & chr(34) & ":" & chr(34) & "true" & chr(34) & "," and then, how to do the rest jsonData = jsonData & chr(34) & "formatter" & chr(34) & ":" & ? Jesper
|
|
|
42
|
General Category / EasyUI for jQuery / [SOLVED]Datagrid dynamic columns from json with formatter
|
on: May 10, 2022, 03:34:57 PM
|
Hi.
Can't find a solution for this.
Having some column data with a formatter. The formatter is not always in the same column [{ "ID": 1, "field": "col1", "formatter": "formatNumber" }, { "ID": 2, "field": "col2" }, { "ID": 3, "field": "col3" }]
Putting the column data in the grid
var dg = $('#dgList').datagrid({ columns:[data] });
Then i have this function
function formatNumber(value,row){ if (value < 0){ return 'background-color:#ffee00;color:red;'; } }
But i get this error:
TypeError: col.formatter is not a function
Any help
Regards Jesper
|
|
|
44
|
General Category / EasyUI for jQuery / [SOLVED]Datagrid insertrow and enableDnd
|
on: April 27, 2022, 07:37:17 AM
|
Hi
Have some trouble. In another project i use enableDnd in onloadSuccess. Works.
Now i put data with insertRow and want to enableDnd on this datagrid.
With a button i can do $('#dgList').datagrid('enableDnd'), but how to enable it when inserting rows
Any help
Jesper
|
|
|
|