EasyUI Forum
May 05, 2024, 09:52:04 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1] 2
1  General Category / EasyUI for jQuery / Re: dynamic change of tab panel title on: December 15, 2016, 09:02:40 PM
It seems like if I create tab panel via HTML I can place image elements in the title...

https://assets.mypatentideas.com/images/loading/decagon.gif

Code:
<div id="idea-tab-subset" class="ideaTabs" title=" <IMG class='tabimage' src='{ASSETS}/images/loading/decagon.gif' height=20 /> Subset Analysis" data-options="disabled:false" style="padding:10px; display:none;">

How do I access the element via jquery to show/hide or change attribute source?

Notice the class "tabimage" ... does easyui append title using $(str)?
2  General Category / EasyUI for jQuery / Re: dynamic change of tab panel title on: December 15, 2016, 08:50:55 PM
Yes, it seems like setTitle should have worked, but it doesn't ...


Code:
function setTabTitle(selector,index,newTitle)
{
var tab = $(selector).tabs('getTab', index);
$(selector).tabs('update', {
  tab: tab,
  options: {
title: newTitle
  }
});
}


Usage: 
Code:
setTabTitle("#tt",2,"testtitle");

Could easily be updated into the system as a new method...

3  General Category / EasyUI for jQuery / Re: cell "format" as an attribute of column in datagrid on: December 12, 2016, 05:39:53 PM
Yes, that was my workaround after finding out "table data" and "direct data" behave differently.

4  General Category / EasyUI for jQuery / cell "format" as an attribute of column in datagrid on: December 12, 2016, 10:17:51 AM
Hi,

I am trying to sort data that I have built in HTML...

The sorting is "as a string"... that is "73" and "7" are before "6"...

In your data examples, when you put in the data field, it works as expected, but in the table format, it does not.

In the data examples, you can do "type of" ... which is not possible with table, so I propose adding type-of as a column attribute
Code:
if(typeof(data) == 'number')  
if(typeof(data) == 'boolean')

In the same vain, your sorter: true, with asc and desc ... you should also have default methods of "alpha" or "numeric" with custom functions to override.

Code:
field:'freq', align: 'center',sortable:true, order:'desc', format:'number'



5  General Category / EasyUI for jQuery / htooltip as feature of columns in datagrid on: December 11, 2016, 05:13:23 AM
Hi,

I want to have tooltips on the column headers for datagrid...

I found how to manually add tooltips within a row

http://www.jeasyui.com/forum/index.php?topic=1689.0
http://www.jeasyui.com/forum/index.php?topic=1936.0

However, that is not what I want/need for adding to the header.

I would propose a new attribute, and an extension of the built in functionality.

Something like (htooltip):
Code:
columns:[[
{halign:'center',htooltip:'my tool tip',field:'id',title:'ID',align:'center',width:50,sortable:false},
{halign:'center',field:'status',title:'Status',align:'center',sortable:false},
{halign:'center',field:'created',title:'Created',width:90,align:'center',sortable:false},
{halign:'center',field:'name',title:'Name',width:90,sortable:false},
{halign:'center',field:'project',title:'Project',width:90,sortable:false},
{halign:'center',field:'parent',title:'Parent',sortable:false},
{halign:'center',field:'versions',title:'Versions',align:'center',sortable:false},
{halign:'center',field:'reported',title:'Report Generated',width:90,align:'center',sortable:false},
]],

6  General Category / EasyUI for jQuery / onStopResize in easyui-window on: December 09, 2016, 11:07:31 PM
I want to trigger
Code:
onStopResize: function(e){
                                     console.log(e);
  },


within an easyui-window ... I believe "window" depends on "resizable" so does that mean it inherits resizable events?

If not, how would I do this trigger?  I basically want to get the new width/height and update an element inside accordingly...
7  General Category / EasyUI for jQuery / Combobox, capture "Create New" on: December 09, 2016, 05:51:50 PM
I am creating a combobox from a text input using external data... If the autocomplete is false, but the user typed something, I want to use that information to create a new (in this case) project, append to the beginning of the data...

Code:
var createNewProject = "";

within the constructor, onchange, I capture if the value hasn't changed... empty is a custom function ...

Code:
onChange: function (newValue, oldValue) {
if(!empty(newValue))
{
createNewProject = newValue;
}
}

I have tried the several handlers and haven't figured out HOW to trigger this new value to update the select, nor is it obvious how to add a single new value...
8  General Category / EasyUI for jQuery / validatebox success on: December 04, 2016, 07:45:43 AM
Hi,

Is there a trigger to do "success" ... e.g., a green check box or a highlight or something.

So it starts as a red box, a border highlight function would be nice, or a green "checkbox" if it returns true.

See for example:

https://github.com/ushelp/EasyCheck/blob/master/doc/images/tooltip.png

9  General Category / EasyUI for jQuery / Re: Default "onfocus" and "onblur" functionality on: December 02, 2016, 10:35:26 AM
So here is my solution, with two functions ... basic focus-select

Code:
function bindFocusSelect(selector)
{
$(selector).textbox('textbox').bind('focus', function(e){
$(selector).textbox('textbox').data('has-triggered', false);
$(selector).textbox('textbox').select();
});
}

The extra data attribute is intentional... to allow for "blur" or "enter" to trigger an event only once...

Code:
function bindTriggerEnterOrBlur(selector,myFunction)
{
$(selector).textbox('textbox').bind('blur keypress', function(e){
if (e.type == 'blur' || e.keyCode == 13) {
if (!$(selector).textbox('textbox').data('has-triggered')) {
$(selector).textbox('textbox').data('has-triggered', true);
// do something only once, not twice
myFunction();
// e.g., if I hit "[enter"] and tab to blur, I don't want it to call twice...
}
}
});

bindFocusSelect(selector);
}


The usage:

Code:
bindTriggerEnterOrBlur('#login-input-email',submitLoginEmail);

would call a function "submitLoginEmail()" without parameters

... or the most basic usage ...

Code:
bindFocusSelect('#login-input-email');
10  General Category / EasyUI for jQuery / Re: Default "onfocus" and "onblur" functionality on: November 24, 2016, 03:13:25 AM
Bump...

So in HTML standard I can do this

Code:
<input id="my-id" type="text" onfocus="this.select();" />

What is the equivalent for "easyui-textbox" or "easyui-passwordbox"  ?

Code:
$('#my-id').textbox('textbox').bind('focus', function(e){
$('#login-input-email').textbox('textbox').select();
});

11  General Category / Bug Report / Re: For easyui-tabs, fit: true (full-height) breaks tabPosition:left on: November 24, 2016, 03:08:36 AM
No thanks.
12  General Category / Bug Report / Re: For easyui-tabs, fit: true (full-height) breaks tabPosition:left on: November 19, 2016, 07:48:06 AM
In your link https://wizard.mypatentideas.com/, you haven't define any tabs component in your west region. Your code is too complext to find out what problem may be. So please look at this example http://code.reloado.com/udacek3/3/edit#preview. It have similar layout as yours and it works fine.

I am not following you on what you mean:  "you haven't define any tabs component in your west region."

I do have the entire "account.tpl" file in the wizard-west... (if logged in), if not, it is the entire "login.tpl" file in the west ...  If not logged in, you are correct, there are no tabs to the "west" ...

I am placing additional divs inside the "west-region"...

In the example, I change one parameter, and easyui breaks.  Is that not the definition of a bug?  No error is being reported.

yes it is complicated, but isn't that the purpose of using easyui to build a nice web app.

My only thought is I may be missing a closing </div> tag or something...

I am struggling to understand how to control certain elements within easyui features... such as "center"

13  General Category / Bug Report / Re: $.messager.alert fn doesn't trigger on "x-close" on: November 19, 2016, 07:31:30 AM
Yes, this appears to work...  Thank you!   Roll Eyes

Code:
$.messager.alert({title: 'Logout: System Idle',
msg: 'For your security, the system has logged you out due to inactivity',
onClose: function(){ alertLogout(); },
icon: 'info',
fn: function(){ alertLogout();}
});
14  General Category / Bug Report / Re: For easyui-tabs, fit: true (full-height) breaks tabPosition:left on: November 19, 2016, 03:48:42 AM
Code:
<div id="history-tabs" class="easyui-tabs" data-options="tabPosition:'left', pill: true, border: false, height: 400">

Works as expected...



Code:
<div id="history-tabs" class="easyui-tabs" data-options="tabPosition:'left', pill: true, border: false, fit: true">

Doesn't work ...

15  General Category / Bug Report / Re: Feature Request for combobox ... allow default SELECT behavior on: November 19, 2016, 03:38:49 AM
You can set the 'editable' property to false to prevent the user from typing on the textbox.

Thanks that appears to work as expected... better on the phone...
Pages: [1] 2
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!