Has anyone gotten this to work properly in Version 1.0.11119.0 of the toolkit. I put in the code recompile and the whole thing disappears when you run it in the test application that comes with the tool kit? Any ideas.
-------------
Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
//Original end
// change 1 start
set_activeTabIndex : function(value) {
if (!this.get_isInitialized()) {
this._cachedActiveTabIndex = value;
}
else {
if (value < -1 || value >=
this.get_tabs().length) {throw Error.argumentOutOfRange("value");
}
// only if new tab is enabled then make active
if (this.get_tabs()[value]._enabled) {
if (this._activeTabIndex != -1) {
this.get_tabs()[this._activeTabIndex]._set_active(false);
}
this._activeTabIndex = value;
if (this._activeTabIndex != -1) {
this.get_tabs()[this._activeTabIndex]._set_active(true);
// original lines below
if (this._get_active()) {
var next =
this._owner.getNearestTab(false);
if (!!next) {
this._owner.set_activeTab(next);
}
}
this._deactivate();
},
// _show : function() {
// if (this._enabled) {
// // original line
// this._tab.style.display = '';
// }
// else
// {
// this._tab.disabled = true;
// }
// },
// _hide : function() {
// if (this._enabled){
// this._tab.style.display = 'none';
// }
// else
// {
// this._tab.disabled = true;
// }
// // original lines below
// if (this._get_active()) {
// var next = this._owner.getNearestTab(false);
// if (!!next) {
// this._owner.set_activeTab(next);
// }
// }
// this._deactivate();
// },
// Change 2 end
-------------
Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
The thing is though that whilst a workaround has been posted to having a tab disabled (and visible) the fix itself hasn't (I believe) been incorporated into a released version of the toolkit.
If I'm incorrect in saying that come someone point me to the release that contained the fix.
I'm still using an old version of the kit because I tried to apply the workaround to a newer version and it didn't work.
I like what is in the kit but I don't want to have to recompile the kit myself having made the changes because I don't like changing any third party tools I bring into an application.
It really would be helpful if someone close to the tabcontainer control would apply the fix and end this problem once and for all.
This was a work around to get the enable and disable to work. It isnt in the current version of the AJAXControlToolkit. I dont want to really go back versions to get this functionality and cant seem to get it to work in the current version. I was just wondering
if anyone has gotten it to work in the newer version until the toolkit includes the fix.
-------------
Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
Ok, the easiest solution would be for the toolkit guys out there to make this change in the next release. It is more than trivial to make the "Enabled=false" to disable the tab. If we developers wanted not to show the tab, we would do that either with "visible=false"
or adding the "display" attribute accordingly.
And for the soulution (requires editting the Tabs.js file):
1) Add to AjaxControlToolkit.TabPanel's type a property named "this._isEnabled =
true;"
function() {
//this._tab.style.display = 'none';
Sys.UI.DomElement.addCssClass(this._tab,
"ajax__tab_disabled");
this._isEnabled =
false;
if (this._get_active()) {
var next =
this._owner.getNearestTab(false);
if (!!next) {this._owner.set_activeTab(next);
}
}
this._deactivate();
},
3) (Optional) Create a default class for "ajax__tab_disabled" in Tabs.css.
4) Create your own class for "ajax__tab_disabled" in your stylesheet.css, making it under
".tabView
.ajax__tab_disabled
.ajax__tab_outer".
* For mouse pointer issues:
5) Remove from Tab.css' "ajax__tab_tab" default class the cursor.
6) Add "cursor:pointer;" to your "ajax__tab_hover"
class, and "cursor:default;" to your newly "ajax__tab_disabled" class.
BGriffin_TPA
Member
489 Points
311 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Apr 16, 2008 02:59 PM|LINK
If you cant raise the bridge, lower the river..[Yes] don't wait for someone
here to do it..time to get proactive and search for others who have
open source Jscript tab controls..you'll find an alternate solution here..
actually, you'll have a number to choose from..[:)]
http://www.noupe.com/ajax/45-fresh-out-of-the-oven-jquery-plugins.html item 38..and more
Regards...[cool]
spafa9
Member
126 Points
112 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Apr 29, 2008 01:16 PM|LINK
Has anyone gotten this to work properly in Version 1.0.11119.0 of the toolkit. I put in the code recompile and the whole thing disappears when you run it in the test application that comes with the tool kit? Any ideas.
Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
spafa9
Member
126 Points
112 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Apr 29, 2008 09:30 PM|LINK
Are you using Version 1.0.11119.0 I cant get it to work in this version of the toolkit.
//Change 1 Orginal code begin// set_activeTabIndex : function(value) {
// if (!this.get_isInitialized()) {
// this._cachedActiveTabIndex = value;
// } else {
//
// if (value < -1 || value >= this.get_tabs().length) {
// throw Error.argumentOutOfRange("value");
// }
// if (this._activeTabIndex != -1) {
// this.get_tabs()[this._activeTabIndex]._set_active(false);
// }
// this._activeTabIndex = value;
// if (this._activeTabIndex != -1) {
// this.get_tabs()[this._activeTabIndex]._set_active(true);
// }
// if (this._loaded) {
// this.raiseActiveTabChanged();
// }
// this.raisePropertyChanged("activeTabIndex");
// }
// },
//Original end // change 1 start set_activeTabIndex : function(value) { if (!this.get_isInitialized()) { this._cachedActiveTabIndex = value;}
else { if (value < -1 || value >= this.get_tabs().length) {throw Error.argumentOutOfRange("value");}
// only if new tab is enabled then make active if (this.get_tabs()[value]._enabled) { if (this._activeTabIndex != -1) { this.get_tabs()[this._activeTabIndex]._set_active(false);}
this._activeTabIndex = value; if (this._activeTabIndex != -1) { this.get_tabs()[this._activeTabIndex]._set_active(true);}
if (this._loaded) {this.raiseActiveTabChanged();}
this.raisePropertyChanged("activeTabIndex");}
// no else}
},
//Change 1 end//orginal code change 2 start
// _activate : function() {
// var elt = this.get_element();
// $common.setVisible(elt, true);
// Sys.UI.DomElement.addCssClass(this._tab, "ajax__tab_active");
//
// this.populate();
//
// this._show();
//
// this._owner.get_element().style.visibility = 'visible';
// },
// _deactivate : function() {
// var elt = this.get_element();
// $common.setVisible(elt, false);
// Sys.UI.DomElement.removeCssClass(this._tab, "ajax__tab_active");
// },
// _show : function() {
// this._tab.style.display = '';
// },
// _hide : function() {
// this._tab.style.display = 'none';
// if (this._get_active()) {
// var next = this._owner.getNearestTab(false);
// if (!!next) {
// this._owner.set_activeTab(next);
// }
// }
// this._deactivate();
// },
//origintal code change 2 end
//Change 2 start:
_activate : function() { if (this._enabled) { var elt = this.get_element();Sys.UI.DomElement.setVisible(elt,
true); Sys.UI.DomElement.addCssClass(this._tab, "ajax__tab_active");
this.populate();
this._show();}
},
_deactivate : function() { if (this._enabled) { // original lines below var elt = this.get_element();Sys.UI.DomElement.setVisible(elt, false);}
Sys.UI.DomElement.removeCssClass(this._tab, "ajax__tab_active");},
_show : function() { if (this._enabled) { // original line this._tab.style.display = '';
this._tab.disabled = false;}
else{
this._tab.disabled = true;}
},
_hide : function() { if (this._enabled){ this._tab.style.display = 'none'; this._tab.disabled = false;}
else{
this._tab.disabled = true;}
// original lines below if (this._get_active()) { var next = this._owner.getNearestTab(false); if (!!next) { this._owner.set_activeTab(next);}
}
this._deactivate();},
// _show : function() {
// if (this._enabled) {
// // original line
// this._tab.style.display = '';
// }
// else
// {
// this._tab.disabled = true;
// }
// },
// _hide : function() {
// if (this._enabled){
// this._tab.style.display = 'none';
// }
// else
// {
// this._tab.disabled = true;
// }
// // original lines below
// if (this._get_active()) {
// var next = this._owner.getNearestTab(false);
// if (!!next) {
// this._owner.set_activeTab(next);
// }
// }
// this._deactivate();
// },
// Change 2 end
Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
BGriffin_TPA
Member
489 Points
311 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Apr 30, 2008 02:23 PM|LINK
spafa9 :
Nope..and you wont get it to work either. Once a new version of the
kit is released, it is assumed everyone will upgrade as soon as possible.
Support and maintenance on the new verision proceeds and support on the
previous versions stops. The newest version usually fixes / enhances things
beyond your immediate need [:)] , and there simply isn't the resources to keep
all the versions current (which simply makes them the same as the new one?)
Upgrading should be issue free. I've been doing it myself for 2 commercial webites,
for 2 years and had no problems with the newest version fixing what they claim
they fix, however to be fair, sometimes new problems are created..[:S]
Upgrade. [cool]
zoetosis
Member
265 Points
119 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Apr 30, 2008 02:57 PM|LINK
The thing is though that whilst a workaround has been posted to having a tab disabled (and visible) the fix itself hasn't (I believe) been incorporated into a released version of the toolkit.
If I'm incorrect in saying that come someone point me to the release that contained the fix.
I'm still using an old version of the kit because I tried to apply the workaround to a newer version and it didn't work.
I like what is in the kit but I don't want to have to recompile the kit myself having made the changes because I don't like changing any third party tools I bring into an application.
It really would be helpful if someone close to the tabcontainer control would apply the fix and end this problem once and for all.
spafa9
Member
126 Points
112 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Apr 30, 2008 04:17 PM|LINK
This was a work around to get the enable and disable to work. It isnt in the current version of the AJAXControlToolkit. I dont want to really go back versions to get this functionality and cant seem to get it to work in the current version. I was just wondering if anyone has gotten it to work in the newer version until the toolkit includes the fix.
Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
benmat2008
Member
9 Points
35 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Dec 29, 2008 08:56 PM|LINK
Hi
I did exactly as what you told in this section.but after compilation and run it.After that ,My tabcontainer is vanished,no tabs at all.!
Why?
can anyone help me?
Thanks in advance
Ben
zoetosis
Member
265 Points
119 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Feb 09, 2009 09:58 AM|LINK
Johnny_Boy
Member
9 Points
61 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Feb 11, 2009 01:39 PM|LINK
Ok, the easiest solution would be for the toolkit guys out there to make this change in the next release. It is more than trivial to make the "Enabled=false" to disable the tab. If we developers wanted not to show the tab, we would do that either with "visible=false" or adding the "display" attribute accordingly.
And for the soulution (requires editting the Tabs.js file):
1) Add to AjaxControlToolkit.TabPanel's type a property named "this._isEnabled = true;"
2) Change the _show() and _hide() methods:
_show: function() { //this._tab.style.display = ''; Sys.UI.DomElement.removeCssClass(this._tab, "ajax__tab_disabled");this._isEnabled = true;},
_hide:
function() { //this._tab.style.display = 'none'; Sys.UI.DomElement.addCssClass(this._tab, "ajax__tab_disabled"); this._isEnabled = false; if (this._get_active()) { var next = this._owner.getNearestTab(false); if (!!next) {this._owner.set_activeTab(next);}
}
this._deactivate();},
3) (Optional) Create a default class for "ajax__tab_disabled" in Tabs.css.
4) Create your own class for "ajax__tab_disabled" in your stylesheet.css, making it under ".tabView .ajax__tab_disabled .ajax__tab_outer".
* For mouse pointer issues:
5) Remove from Tab.css' "ajax__tab_tab" default class the cursor.
6) Add "cursor:pointer;" to your "ajax__tab_hover" class, and "cursor:default;" to your newly "ajax__tab_disabled" class.
Hope this was helpful.
Manmadhan
Member
67 Points
165 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Jul 14, 2009 09:32 PM|LINK
Where can I find the Tabs.js file?
Kichu.