EasyUI Forum
May 12, 2024, 08:59:57 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 4 5 [6] 7
76  General Category / EasyUI for jQuery / [FIXED] easyui-texteditor lib 404 on: October 11, 2018, 06:25:59 PM
http://www.jeasyui.com/extension/downloads/jquery-easyui-texteditor.zip

Ever feel you're in the wrong place
404 (Page Not Found) Error
77  General Category / General Discussion / disable to hide ALL panels in accordion on: October 08, 2018, 07:41:54 PM
How to disable in accordion hide all panels?
need to be any-one is showed always
78  General Category / General Discussion / easyui-<...>box 'prompt' option value as easyui-<...>box label hint on: August 26, 2018, 11:23:17 AM
how to get label object for assign tooltip with content from prompt value?

or may be add labelHint option to easyui-<...>box options?
79  General Category / General Discussion / [RESOLVED] tooltip of cobobox items show under combobox panel on: July 12, 2018, 05:29:18 PM
combobox:

Code:
 , onBeforeLoad: mComboboxOnBeforeLoad_ClearTooltip
 , onLoadSuccess: mComboboxOnLoadSuccess_CreateTooltip
 , formatter: mComboboxFormatter

formatter:
Code:
 function mComboboxFormatter(row){

  var currentValue = $( this ).combobox('getText');
  var pattern = '(' + currentValue.replace(reEscape, '\\$1') + ')';

  var s = "<div class=\"item "+row.cssID+" easyui-tooltip\" title=\""+row.Hint+"\">"
     + row.Label.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>')
   +"</div>";
  return s;
 };

Tooltip clear:
Code:
 function mComboboxOnBeforeLoad_ClearTooltip(param){
  $( this ).combobox('panel').find('.easyui-tooltip').tooltip('destroy');
 }

Tooltip creator:
Code:
 function mComboboxOnLoadSuccess_CreateTooltip(){
  $( this ).combobox('panel').find('.easyui-tooltip').tooltip({
     showDelay: 100
   , position: 'bottom'
  });
 }

Result in attach pic.


How to fix it?
80  General Category / General Discussion / numberbox groupSeparator and validator on: March 31, 2018, 04:52:59 PM
Code:
 <input id="frmAmount" class="easyui-numberbox"
  data-options="label: 'Amount'
, prompt: 'Amount'
, cls: 'r'
, groupSeparator: ' '
, precision: 0
, width: 500
, validType:{
   greaterThan:[0]
  ,lessThanOrEqualTo:[1000]
 }
, required: true
"
>

Code:
	$.extend($.fn.validatebox.defaults.rules, {
greaterThan : {
validator : function(value, param) {
return parseInt(value,10)>parseInt(param[0],10);
},
message : 'can be greather then {0}'
}
, lessThanOrEqualTo : {
validator : function(value, param) {
return parseInt(value,10)<=parseInt(param[0],10);
},
message : 'can be less or equal to {1}'
}
});

user put 20000
in the lessThanOrEqualTo
    value = '20 000'
  and parseInt('20 000',10) == 20
 Sad
81  General Category / General Discussion / Re: ueasyui-textbox disable input invalid chars on: March 20, 2018, 07:08:53 AM
 need lowercase english and space only

Code:
 }else if(!(/[a-z ]/.test(e.key))){
   return false;
 }

work, thnx
82  General Category / General Discussion / [SOLVED] easyui-textbox disable input invalid chars on: March 19, 2018, 07:05:39 PM
I can't think of

Code:

 $('#tb').textbox('textbox').bind('keydown', function(e){
  if (e.keyCode == 13){ // when press ENTER key, accept the inputed value.
   $('#tb').textbox('setValue', $(this).val());
   $('#bSubmit').focus();
  }else if(!(/[a-z ]/.test(e.key))) {
     ???????
  }
 });

83  General Category / General Discussion / sometimes need to sleep.... on: March 03, 2018, 05:52:10 PM
Code:
<div id="elmContainer"><input id="elm" class="easyui-textbox" ....

Code:
$("#elmContainer").hide()
84  General Category / General Discussion / [SELFSOLVED] HIDE textbox ? on: March 03, 2018, 02:52:31 PM
How corrct hide textbox?

Code:
$('#elm').textbox('textbox').hide();

leaves <span> with border ;(



and
Code:
$('#elm').textbox('textbox').parent().hide();

hide this <span>, but leave <label> of this textbox
85  General Category / General Discussion / Re: datagrid cell visibility refresh on: March 01, 2018, 08:42:05 AM
thank you very much!

= ADDITIONAL =
view: scrollview
table have 1.5K records
pageSize = 50

Code:
$.each(
     $('#dg').datagrid('getRows'),function(eachIndex, singleRow){

          cosole.log($('#dg').datagrid('getRowIndex', singleRow),eachIndex);

       }
  )

Code:

eachIndex
and
Code:

$('#dg').datagrid('getRowIndex', singleRow)

is NOT SAME if currentPage > 2 !

== ADDITIONAL 2 ==

if this code
Code:
$.each(
     $('#dg').datagrid('getRows'),function(eachIndex, singleRow){
          $('#dg').datagrid('updateRow',{
              index: $('#dg').datagrid('getRowIndex', singleRow)
            , row: {Age: null}
           })
       }
  )
fires periodicaly -  ROW updated only FIRST time ! (in second and more times row not repainted because the Age is not changed (null to null) )


Code:
$.each(
     $('#dg').datagrid('getRows'),function(eachIndex, singleRow){
          $('#dg').datagrid('updateRow',{
              index: $('#dg').datagrid('getRowIndex', singleRow)
            , row: {Age: new Date()}
           })
       }
  )
86  General Category / General Discussion / Re: datagrid cell visibility refresh on: February 28, 2018, 04:26:59 PM
hmmmmmmm.......

one more:

Code:

$('#dg').datagrid('updateRow',{ ....})  

refreshing|repainting ALL row fields (visible cells) or only CHANGED?

if all then
Code:

$('#dg').datagrid('refreshRow',eachIndex /* ?????? or $('#dg').datagrid('getRowIndex', singleRow) */ )  
easier
87  General Category / General Discussion / Re: datagrid cell visibility refresh on: February 28, 2018, 03:56:15 PM
THANX!

this works (view: scrollview with pageSize 50)

Code:
  $.each(
     $('#dg').datagrid('getRows'),function(eachIndex, singleRow){
          $('#dg').datagrid('updateRow',{
              index: $('#dg').datagrid('getRowIndex', singleRow)
            , row: {Age: null}
           })
       }
  )

 I`m not sure in
Code:

index: $('#dg').datagrid('getRowIndex', singleRow)

may be it replaced by
Code:

index: eachIndex
for some optimization ?

BUT Smiley Im not sure that 'eachIndex' can be equivalent to real 'rowIndex' of row when scroolview currentPage be 10 or 100 or 200 because scroolview delete data of invisible prevousPage or nextPage.
88  General Category / General Discussion / [SOLVED] datagrid cell visibility refresh on: February 26, 2018, 07:32:14 AM
in easyui-datagrid i have

Code:
	<th field="Age"	width="05%" align="center" formatter="fmtAge"	>Age</th>

Code:
	function fmtAge(val,row){
return getDeltaAge(row.inserted);
}

Code:
	function getDeltaAge(dateUTC) {

var matches = dateUTC.match(/^\s*(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})\s*$/);
var DateUTC = new Date(parseInt(matches[1],10),parseInt(matches[2],10) - 1,parseInt(matches[3],10),parseInt(matches[4],10),parseInt(matches[5],10),parseInt(matches[6],10));

var now = new Date()
  , nowUTCtimestamp = now.getTime() + now.getTimezoneOffset()*60*1000
  , nowUTC = new Date(nowUTCtimestamp)
  , difference = nowUTC.getTime() - DateUTC.getTime()
  , ageDifference = Math.floor(difference/1000/60/60/24)
  ;

if ( difference < 0 ){
ageDifference = "";
ageName = "new";
}else if( ageDifference > 0){
ageName = " d";
}else{
difference -= ageDifference*1000*60*60*24;
var ageDifference = Math.floor(difference/1000/60/60);

if( ageDifference > 0 ){
ageName = " h";
}else{
difference -= ageDifference*1000*60*60;

var ageDifference = Math.floor(difference/1000/60);
if( ageDifference > 0 ){
ageName = " m";
}else{
ageDifference = "";
ageName = "new";
}
}
}
if(ageDifference != "" && ageDifference != 0 && ageDifference<10){ageDifference = "0" + ageDifference };

return ageDifference+ageName;
};

How refresh visibility(?) ONLY THIS CELL ?
without  reload all|part of data or to refresh full row or refresh datagrid-view
89  General Category / General Discussion / Re: textbox with menu like searchbox on: February 18, 2018, 03:27:33 AM
and

Code:
$( icon[0] ).removeClass('searchbox-button').addClass('icon-MyButton')

solve my problem!

THANX!
90  General Category / General Discussion / [SOLVED] textbox with menu like searchbox on: February 16, 2018, 06:45:46 PM
Can I replace in textbox the button (or change buttonType?) to menu like searchbox?
 ( how add menu to textbox)
OR
 how delete search icon in searchbox ? Smiley
Pages: 1 ... 4 5 [6] 7
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!