var curId = $("#defaultRibbon_home_" + args.value); |
var curId = $("#defaultRibbon_home_Font_" + args.value); |
// Create Ribbon Object
ribbonObj = $("#defaultRibbon").data("ejRibbon");
// Disable Group
function onDisableGroup(args) {
var curId = $("#defaultRibbon_home_" + args.value);
$(curId).addClass("e-disable");
if ($(curId).find(".e-ddl").length > 0) {
var array = $(curId).find(".e-ddl");
for (var i = 0; i < array.length; i++) {
if (array.eq(i).hasClass("e-ddl")) {
var ddl = array.eq(i).attr("id").replace("_wrapper", "")
$("#" + ddl).ejDropDownList("disable"); // Here, we can disable drop down list items.
}
}
}
}
// Enable Group
function onEnableGroup(args) {
var curId = $("#defaultRibbon_home_" + args.value);
$(curId).removeClass("e-disable");
if ($(curId).find(".e-ddl").length > 0) {
var array = $(curId).find(".e-ddl");
for (var i = 0; i < array.length; i++) {
if (array.eq(i).hasClass("e-ddl")) {
var ddl = array.eq(i).attr("id").replace("_wrapper", "");
$("#" + ddl).ejDropDownList("enable"); // Here, we can enable drop down list items.
}
}
}
}
// Disable Group Items
function onDisableGroupItems(args) {
var curId = $("#defaultRibbon_home_Font_" + args.value);
$(curId).addClass("e-disable");
if ($(curId).find(".e-ddl").length > 0) {
var ddl = $(curId).find(".e-ddl").attr("id").replace("_wrapper", "");
$("#" + ddl).ejDropDownList("disable"); // Here, we can disable drop down list items.
}
}
// Enable Group Items
function onEnableGroupItems(args) {
var curId = $("#defaultRibbon_home_Font_" + args.value);
$(curId).removeClass("e-disable");
if ($(curId).find(".e-ddl").length > 0) {
var ddl = $(curId).find(".e-ddl").attr("id").replace("_wrapper", "");
$("#" + ddl).ejDropDownList("enable"); // Here, we can enable drop down list items.
}
}
|
// Disable Groups
function onDisableGroup(args) {
var curId = $("#defaultRibbon_home_" + args.value);
if ($(curId).find(".e-ddl").length > 0) {
var array = $(curId).find(".e-ddl"); // Find all drop down list in a groups
for (var i = 0; i < array.length; i++) {
if (array.eq(i).hasClass("e-ddl")) {
var ddl = array.eq(i).attr("id").replace("_wrapper", "")
$("#" + ddl).ejDropDownList("disable");
}
}
}
if ($(curId).find(".e-button").length > 0) {
var button = $(curId).find(".e-button"); // Find all buttons in the groups
for (var i = 0; i < button.length; i++) {
var buttonId = button.eq(i).attr("id");
$("#" +buttonId).ejButton("disable");
}
}
}
// Enable Groups
function onEnableGroup(args) {
var curId = $("#defaultRibbon_home_" + args.value);
if ($(curId).find(".e-ddl").length > 0) {
var array = $(curId).find(".e-ddl"); // Find all drop down list in a groups
for (var i = 0; i < array.length; i++) {
if (array.eq(i).hasClass("e-ddl")) {
var ddl = array.eq(i).attr("id").replace("_wrapper", "");
$("#" + ddl).ejDropDownList("enable");
}
}
}
if ($(curId).find(".e-button").length > 0) {
var button = $(curId).find(".e-button"); // Find all buttons in the groups
for (var i = 0; i < button.length; i++) {
var buttonId = button.eq(i).attr("id");
$("#" +buttonId).ejButton("enable");
}
}
}
// Disable Group Items
function onDisableGroupItems(args) {
var curId = $("#defaultRibbon_home_Font_" + args.value);
if ($(curId).find(".e-ddl").length > 0) {
var ddl = $(curId).find(".e-ddl").attr("id").replace("_wrapper", "");
$("#" + ddl).ejDropDownList("disable"); // Disable particular drop down list
}
else if($(curId).find(".e-button").length > 0){
var button = $(curId).find(".e-button").attr("id");
$("#" + button).ejButton("disable"); // Disable particular button
}
}
// Enable Group Items
function onEnableGroupItems(args) {
var curId = $("#defaultRibbon_home_Font_" + args.value);
if ($(curId).find(".e-ddl").length > 0) {
var ddl = $(curId).find(".e-ddl").attr("id").replace("_wrapper", "");
$("#" + ddl).ejDropDownList("enable"); // Enable particular drop down list
}
else if ($(curId).find(".e-button").length > 0) {
var button = $(curId).find(".e-button").attr("id");
$("#" + button).ejButton("enable"); // Enable particular button
}
} |