DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE
Fixes :26263, 26549 ClientDependency version updated. Fixes chrome issue with jsTree upgrade. Fixes modal issue with iframe & now has fade transitions. Updates delete transition. [TFS Changeset #64768]
This commit is contained in:
Binary file not shown.
@@ -1,17 +1,25 @@
|
||||
<clientDependency isDebugMode="false" version="12">
|
||||
<fileRegistration defaultProvider="PageHeaderProvider" fileDependencyExtensions="js,css" enableCompositeFiles="true">
|
||||
<clientDependency version="13">
|
||||
<fileRegistration defaultProvider="PageHeaderProvider" fileDependencyExtensions="js,css">
|
||||
<providers>
|
||||
<add name="PageHeaderProvider" type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core" />
|
||||
<add name="LazyLoadProvider" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadProvider, ClientDependency.Core" />
|
||||
<add name="CanvasProvider" type="umbraco.presentation.LiveEditing.CanvasClientDependencyProvider, umbraco" />
|
||||
<add name="PageHeaderProvider"
|
||||
type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core"
|
||||
isDebug="true"/>
|
||||
<add name="LazyLoadProvider"
|
||||
type="ClientDependency.Core.FileRegistration.Providers.LazyLoadProvider, ClientDependency.Core"
|
||||
isDebug="true"/>
|
||||
<add name="CanvasProvider"
|
||||
type="umbraco.presentation.LiveEditing.CanvasClientDependencyProvider, umbraco"
|
||||
isDebug="true"/>
|
||||
</providers>
|
||||
</fileRegistration>
|
||||
<compositeFiles defaultProvider="CompositeFileProcessor" compositeFilePath="~/App_Data/ClientDependency" compositeFileHandlerPath="DependencyHandler.axd">
|
||||
<compositeFiles defaultProvider="CompositeFileProcessor" compositeFileHandlerPath="DependencyHandler.axd">
|
||||
<providers>
|
||||
<add name="CompositeFileProcessor"
|
||||
type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core"
|
||||
enableCssMinify="true"
|
||||
enableJsMinify="true"/>
|
||||
enableJsMinify="true"
|
||||
persistFiles="true"
|
||||
compositeFilePath="~/App_Data/ClientDependency" />
|
||||
</providers>
|
||||
</compositeFiles>
|
||||
</clientDependency>
|
||||
|
||||
@@ -9,6 +9,23 @@ namespace umbraco.presentation.LiveEditing
|
||||
{
|
||||
public class CanvasClientDependencyProvider : LazyLoadProvider
|
||||
{
|
||||
public CanvasClientDependencyProvider()
|
||||
: base()
|
||||
{
|
||||
//Force this to always be debug mode!
|
||||
this.IsDebugMode = true;
|
||||
}
|
||||
|
||||
public new const string DefaultName = "CanvasProvider";
|
||||
|
||||
public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
|
||||
{
|
||||
base.Initialize(name, config);
|
||||
|
||||
//Force this to always be debug mode!
|
||||
this.IsDebugMode = true;
|
||||
}
|
||||
|
||||
protected override void ProcessSingleCssFile(string css)
|
||||
{
|
||||
if (UmbracoContext.Current.LiveEditingContext.Enabled)
|
||||
@@ -21,14 +38,5 @@ namespace umbraco.presentation.LiveEditing
|
||||
base.ProcessSingleJsFile(js);
|
||||
}
|
||||
|
||||
//protected override void RegisterCssFiles(List<ClientDependency.Core.IClientDependencyFile> cssDependencies)
|
||||
//{
|
||||
// throw new NotImplementedException();
|
||||
//}
|
||||
|
||||
//protected override void RegisterJsFiles(List<ClientDependency.Core.IClientDependencyFile> jsDependencies)
|
||||
//{
|
||||
// throw new NotImplementedException();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,9 +118,9 @@ namespace umbraco.presentation.LiveEditing.Controls
|
||||
//we need a DependencyLoader control
|
||||
bool isNew;
|
||||
UmbracoClientDependencyLoader.TryCreate(this, out isNew);
|
||||
ClientDependencyLoader.Instance.ProviderName = LazyLoadProvider.DefaultName;
|
||||
ClientDependencyLoader.Instance.IsDebugMode = true;
|
||||
|
||||
//force it to use the canvas provider
|
||||
ClientDependencyLoader.Instance.ProviderName = CanvasClientDependencyProvider.DefaultName;
|
||||
|
||||
m_Communicator = new Communicator();
|
||||
m_Communicator.ID = "Communicator";
|
||||
Controls.Add(m_Communicator);
|
||||
|
||||
@@ -67,7 +67,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
_activeTreeType: "content", //tracks which is the active tree type, this is used in searching and syncing.
|
||||
_tree: null, //reference to the jsTree object
|
||||
_isEditMode: false, //not really used YET
|
||||
_isDebug: true, //set to true to enable alert debugging
|
||||
_isDebug: false, //set to true to enable alert debugging
|
||||
_loadedApps: [], //stores the application names that have been loaded to track which JavaScript code has been inserted into the DOM
|
||||
_treeClass: "umbTree", //used for other libraries to detect which elements are an umbraco tree
|
||||
_currenAJAXRequest: false, //used to determine if there is currently an ajax request being executed.
|
||||
@@ -154,7 +154,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
|
||||
//don't rebuild if the tree object exists, the app that's being requested to be loaded is
|
||||
//flagged as already loaded, and the tree actually has nodes in it
|
||||
if (this._tree
|
||||
if (this._tree
|
||||
&& (this._opts.app.toLowerCase() == app.toLowerCase())) {
|
||||
this._debug("not rebuilding");
|
||||
return;
|
||||
@@ -264,7 +264,9 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
//ensures that the style property of the data contains only single quotes since jsTree puts double around the attr
|
||||
for (var i in obj.data.attributes) {
|
||||
if (!obj.data.attributes.hasOwnProperty(i)) continue;
|
||||
if (i == "style" || i == "class") obj.data.attributes[i] = obj.data.attributes[i].replace("\"", "'");
|
||||
if (i == "style" || i == "class") {
|
||||
obj.data.attributes[i] = obj.data.attributes[i].replace(/\"/g, "'");
|
||||
}
|
||||
}
|
||||
|
||||
//recurse through children
|
||||
@@ -503,10 +505,10 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
|
||||
//first, close the branch
|
||||
this._tree.close_branch(this._actionNode.jsNode);
|
||||
//show the ajax loader with deleting text
|
||||
this._actionNode.jsNode.find("a").attr("class", "loading");
|
||||
this._actionNode.jsNode.find("a").css("background-image", "");
|
||||
this._actionNode.jsNode.find("a").html(this._opts.deletingText);
|
||||
//show the deleting text
|
||||
this._actionNode.jsNode.find("a div")
|
||||
.html(this._opts.deletingText)
|
||||
.effect("highlight", {}, 1000);
|
||||
},
|
||||
|
||||
onNodeDeleted: function(EV) {
|
||||
|
||||
@@ -1,129 +1,130 @@
|
||||
(function ($) {
|
||||
$.extend($.tree.plugins, {
|
||||
"contextmenu" : {
|
||||
object : $("<ul id='jstree-contextmenu' class='tree-context' />"),
|
||||
data : {
|
||||
t : false,
|
||||
a : false,
|
||||
r : false
|
||||
},
|
||||
(function($) {
|
||||
$.extend($.tree.plugins, {
|
||||
"contextmenu": {
|
||||
object: $("<ul id='jstree-contextmenu' class='tree-context' />"),
|
||||
data: {
|
||||
t: false,
|
||||
a: false,
|
||||
r: false
|
||||
},
|
||||
|
||||
defaults : {
|
||||
class_name : "hover",
|
||||
items : {
|
||||
create : {
|
||||
label : "Create",
|
||||
icon : "create",
|
||||
visible : function (NODE, TREE_OBJ) { if(NODE.length != 1) return 0; return TREE_OBJ.check("creatable", NODE); },
|
||||
action : function (NODE, TREE_OBJ) { TREE_OBJ.create(false, TREE_OBJ.get_node(NODE[0])); },
|
||||
separator_after : true
|
||||
},
|
||||
rename : {
|
||||
label : "Rename",
|
||||
icon : "rename",
|
||||
visible : function (NODE, TREE_OBJ) { if(NODE.length != 1) return false; return TREE_OBJ.check("renameable", NODE); },
|
||||
action : function (NODE, TREE_OBJ) { TREE_OBJ.rename(NODE); }
|
||||
},
|
||||
remove : {
|
||||
label : "Delete",
|
||||
icon : "remove",
|
||||
visible : function (NODE, TREE_OBJ) { var ok = true; $.each(NODE, function () { if(TREE_OBJ.check("deletable", this) == false) ok = false; return false; }); return ok; },
|
||||
action : function (NODE, TREE_OBJ) { $.each(NODE, function () { TREE_OBJ.remove(this); }); }
|
||||
}
|
||||
}
|
||||
},
|
||||
show : function(obj, t) {
|
||||
var opts = $.extend(true, {}, $.tree.plugins.contextmenu.defaults, t.settings.plugins.contextmenu);
|
||||
obj = $(obj);
|
||||
$.tree.plugins.contextmenu.object.empty();
|
||||
var str = "";
|
||||
var cnt = 0;
|
||||
for(var i in opts.items) {
|
||||
if(!opts.items.hasOwnProperty(i)) continue;
|
||||
if(opts.items[i] === false) continue;
|
||||
var r = 1;
|
||||
if(typeof opts.items[i].visible == "function") r = opts.items[i].visible.call(null, $.tree.plugins.contextmenu.data.a, t);
|
||||
if(r == -1) continue;
|
||||
else cnt ++;
|
||||
if(opts.items[i].separator_before === true) str += "<li class='separator'><span> </span></li>";
|
||||
str += '<li><a href="#" rel="' + i + '" class="' + i + ' ' + (r == 0 ? 'disabled' : '') + '">';
|
||||
if(opts.items[i].icon) str += "<ins " + (opts.items[i].icon.indexOf("/") == -1 ? " class='" + opts.items[i].icon + "' " : " style='background-image:url(\"" + opts.items[i].icon + "\");' " ) + "> </ins>";
|
||||
else str += "<ins> </ins>";
|
||||
str += "<span>" + opts.items[i].label + '</span></a></li>';
|
||||
if(opts.items[i].separator_after === true) str += "<li class='separator'><span> </span></li>";
|
||||
}
|
||||
var tmp = obj.children("a:visible").offset();
|
||||
$.tree.plugins.contextmenu.object.attr("class","tree-context tree-" + t.settings.ui.theme_name.toString() + "-context").html(str);
|
||||
var h = $.tree.plugins.contextmenu.object.height();
|
||||
var w = $.tree.plugins.contextmenu.object.width();
|
||||
var x = tmp.left;
|
||||
var y = tmp.top + parseInt(obj.children("a:visible").height()) + 2;
|
||||
var max_y = $(window).height() + $(window).scrollTop();
|
||||
var max_x = $(window).width() + $(window).scrollLeft();
|
||||
if(y + h > max_y) y = Math.max( (max_y - h - 2), 0);
|
||||
if(x + w > max_x) x = Math.max( (max_x - w - 2), 0);
|
||||
$.tree.plugins.contextmenu.object.css({ "left" : (x), "top" : (y) }).fadeIn("fast");
|
||||
},
|
||||
hide : function () {
|
||||
if(!$.tree.plugins.contextmenu.data.t) return;
|
||||
var opts = $.extend(true, {}, $.tree.plugins.contextmenu.defaults, $.tree.plugins.contextmenu.data.t.settings.plugins.contextmenu);
|
||||
if($.tree.plugins.contextmenu.data.r && $.tree.plugins.contextmenu.data.a) {
|
||||
$.tree.plugins.contextmenu.data.a.children("a, span").removeClass(opts.class_name);
|
||||
}
|
||||
$.tree.plugins.contextmenu.data = { a : false, r : false, t : false };
|
||||
$.tree.plugins.contextmenu.object.fadeOut("fast");
|
||||
},
|
||||
exec : function (cmd) {
|
||||
if($.tree.plugins.contextmenu.data.t == false) return;
|
||||
var opts = $.extend(true, {}, $.tree.plugins.contextmenu.defaults, $.tree.plugins.contextmenu.data.t.settings.plugins.contextmenu);
|
||||
try { opts.items[cmd].action.apply(null, [$.tree.plugins.contextmenu.data.a, $.tree.plugins.contextmenu.data.t]); } catch(e) { };
|
||||
},
|
||||
defaults: {
|
||||
class_name: "hover",
|
||||
items: {
|
||||
create: {
|
||||
label: "Create",
|
||||
icon: "create",
|
||||
visible: function(NODE, TREE_OBJ) { if (NODE.length != 1) return 0; return TREE_OBJ.check("creatable", NODE); },
|
||||
action: function(NODE, TREE_OBJ) { TREE_OBJ.create(false, TREE_OBJ.get_node(NODE[0])); },
|
||||
separator_after: true
|
||||
},
|
||||
rename: {
|
||||
label: "Rename",
|
||||
icon: "rename",
|
||||
visible: function(NODE, TREE_OBJ) { if (NODE.length != 1) return false; return TREE_OBJ.check("renameable", NODE); },
|
||||
action: function(NODE, TREE_OBJ) { TREE_OBJ.rename(NODE); }
|
||||
},
|
||||
remove: {
|
||||
label: "Delete",
|
||||
icon: "remove",
|
||||
visible: function(NODE, TREE_OBJ) { var ok = true; $.each(NODE, function() { if (TREE_OBJ.check("deletable", this) == false) ok = false; return false; }); return ok; },
|
||||
action: function(NODE, TREE_OBJ) { $.each(NODE, function() { TREE_OBJ.remove(this); }); }
|
||||
}
|
||||
}
|
||||
},
|
||||
show: function(obj, t) {
|
||||
var opts = $.extend(true, {}, $.tree.plugins.contextmenu.defaults, t.settings.plugins.contextmenu);
|
||||
obj = $(obj);
|
||||
$.tree.plugins.contextmenu.object.empty();
|
||||
var str = "";
|
||||
var cnt = 0;
|
||||
for (var i in opts.items) {
|
||||
if (!opts.items.hasOwnProperty(i)) continue;
|
||||
if (opts.items[i] === false) continue;
|
||||
var r = 1;
|
||||
if (typeof opts.items[i].visible == "function") r = opts.items[i].visible.call(null, $.tree.plugins.contextmenu.data.a, t);
|
||||
if (r == -1) continue;
|
||||
else cnt++;
|
||||
if (opts.items[i].separator_before === true) str += "<li class='separator'><span> </span></li>";
|
||||
str += '<li><a href="#" rel="' + i + '" class="' + i + ' ' + (r == 0 ? 'disabled' : '') + '">';
|
||||
if (opts.items[i].icon) str += "<ins " + (opts.items[i].icon.indexOf("/") == -1 ? " class='" + opts.items[i].icon + "' " : " style='background-image:url(\"" + opts.items[i].icon + "\");' ") + "> </ins>";
|
||||
else str += "<ins> </ins>";
|
||||
str += "<span>" + opts.items[i].label + '</span></a></li>';
|
||||
if (opts.items[i].separator_after === true) str += "<li class='separator'><span> </span></li>";
|
||||
}
|
||||
var tmp = obj.children("a:visible").offset();
|
||||
$.tree.plugins.contextmenu.object.attr("class", "tree-context tree-" + t.settings.ui.theme_name.toString() + "-context").html(str);
|
||||
var h = $.tree.plugins.contextmenu.object.height();
|
||||
var w = $.tree.plugins.contextmenu.object.width();
|
||||
var x = tmp.left;
|
||||
var y = tmp.top + parseInt(obj.children("a:visible").height()) + 2;
|
||||
var max_y = $(window).height() + $(window).scrollTop();
|
||||
var max_x = $(window).width() + $(window).scrollLeft();
|
||||
if (y + h > max_y) y = Math.max((max_y - h - 2), 0);
|
||||
if (x + w > max_x) x = Math.max((max_x - w - 2), 0);
|
||||
$.tree.plugins.contextmenu.object.css({ "left": (x), "top": (y) }).fadeIn("fast");
|
||||
},
|
||||
hide: function() {
|
||||
if (!$.tree.plugins.contextmenu.data.t) return;
|
||||
var opts = $.extend(true, {}, $.tree.plugins.contextmenu.defaults, $.tree.plugins.contextmenu.data.t.settings.plugins.contextmenu);
|
||||
if ($.tree.plugins.contextmenu.data.r && $.tree.plugins.contextmenu.data.a) {
|
||||
$.tree.plugins.contextmenu.data.a.children("a, span").removeClass(opts.class_name);
|
||||
}
|
||||
$.tree.plugins.contextmenu.data = { a: false, r: false, t: false };
|
||||
$.tree.plugins.contextmenu.object.fadeOut("fast");
|
||||
},
|
||||
exec: function(cmd) {
|
||||
if ($.tree.plugins.contextmenu.data.t == false) return;
|
||||
var opts = $.extend(true, {}, $.tree.plugins.contextmenu.defaults, $.tree.plugins.contextmenu.data.t.settings.plugins.contextmenu);
|
||||
try { opts.items[cmd].action.apply(null, [$.tree.plugins.contextmenu.data.a, $.tree.plugins.contextmenu.data.t]); } catch (e) { };
|
||||
},
|
||||
|
||||
callbacks : {
|
||||
oninit : function () {
|
||||
if(!$.tree.plugins.contextmenu.css) {
|
||||
var css = '#jstree-contextmenu { display:none; position:absolute; z-index:2000; list-style-type:none; margin:0; padding:0; left:-2000px; top:-2000px; } .tree-context { margin:20px; padding:0; width:180px; border:1px solid #979797; padding:2px; background:#f5f5f5; list-style-type:none; }.tree-context li { height:22px; margin:0 0 0 27px; padding:0; background:#ffffff; border-left:1px solid #e0e0e0; }.tree-context li a { position:relative; display:block; height:22px; line-height:22px; margin:0 0 0 -28px; text-decoration:none; color:black; padding:0; }.tree-context li a ins { text-decoration:none; float:left; width:16px; height:16px; margin:0 0 0 0; background-color:#f0f0f0; border:1px solid #f0f0f0; border-width:3px 5px 3px 6px; line-height:16px; }.tree-context li a span { display:block; background:#f0f0f0; margin:0 0 0 29px; padding-left:5px; }.tree-context li.separator { background:#f0f0f0; height:2px; line-height:2px; font-size:1px; border:0; margin:0; padding:0; }.tree-context li.separator span { display:block; margin:0px 0 0px 27px; height:1px; border-top:1px solid #e0e0e0; border-left:1px solid #e0e0e0; line-height:1px; font-size:1px; background:white; }.tree-context li a:hover { border:1px solid #d8f0fa; height:20px; line-height:20px; }.tree-context li a:hover span { background:#e7f4f9; margin-left:28px; }.tree-context li a:hover ins { background-color:#e7f4f9; border-color:#e7f4f9; border-width:2px 5px 2px 5px; }.tree-context li a.disabled { color:gray; }.tree-context li a.disabled ins { }.tree-context li a.disabled:hover { border:0; height:22px; line-height:22px; }.tree-context li a.disabled:hover span { background:#f0f0f0; margin-left:29px; }.tree-context li a.disabled:hover ins { border-color:#f0f0f0; background-color:#f0f0f0; border-width:3px 5px 3px 6px; }';
|
||||
$.tree.plugins.contextmenu.css = this.add_sheet({ str : css });
|
||||
}
|
||||
},
|
||||
onrgtclk : function (n, t, e) {
|
||||
var opts = $.extend(true, {}, $.tree.plugins.contextmenu.defaults, t.settings.plugins.contextmenu);
|
||||
n = $(n);
|
||||
if(n.size() == 0) return;
|
||||
$.tree.plugins.contextmenu.data.t = t;
|
||||
if(!n.children("a:eq(0)").hasClass("clicked")) {
|
||||
$.tree.plugins.contextmenu.data.a = n;
|
||||
$.tree.plugins.contextmenu.data.r = true;
|
||||
n.children("a").addClass(opts.class_name);
|
||||
e.target.blur();
|
||||
}
|
||||
else {
|
||||
$.tree.plugins.contextmenu.data.r = false;
|
||||
$.tree.plugins.contextmenu.data.a = (t.selected_arr && t.selected_arr.length > 1) ? t.selected_arr : t.selected;
|
||||
}
|
||||
$.tree.plugins.contextmenu.show(n, t);
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
// return false; // commented out because you might want to do something in your own callback
|
||||
},
|
||||
onchange : function () { $.tree.plugins.contextmenu.hide(); },
|
||||
beforedata : function () { $.tree.plugins.contextmenu.hide(); },
|
||||
ondestroy : function () { $.tree.plugins.contextmenu.hide(); }
|
||||
}
|
||||
}
|
||||
});
|
||||
$(function () {
|
||||
$.tree.plugins.contextmenu.object.hide().appendTo("body");
|
||||
$("#jstree-contextmenu a", $.tree.plugins.contextmenu.object[0])
|
||||
.live("click", function (event) {
|
||||
if(!$(this).hasClass("disabled")) {
|
||||
$.tree.plugins.contextmenu.exec.apply(null, [$(this).attr("rel")]);
|
||||
$.tree.plugins.contextmenu.hide();
|
||||
}
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
return false;
|
||||
callbacks: {
|
||||
oninit: function() {
|
||||
if (!$.tree.plugins.contextmenu.css) {
|
||||
var css = '#jstree-contextmenu { display:none; position:absolute; z-index:2000; list-style-type:none; margin:0; padding:0; left:-2000px; top:-2000px; } .tree-context { margin:20px; padding:0; width:180px; border:1px solid #979797; padding:2px; background:#f5f5f5; list-style-type:none; }.tree-context li { height:22px; margin:0 0 0 27px; padding:0; background:#ffffff; border-left:1px solid #e0e0e0; }.tree-context li a { position:relative; display:block; height:22px; line-height:22px; margin:0 0 0 -28px; text-decoration:none; color:black; padding:0; }.tree-context li a ins { text-decoration:none; float:left; width:16px; height:16px; margin:0 0 0 0; background-color:#f0f0f0; border:1px solid #f0f0f0; border-width:3px 5px 3px 6px; line-height:16px; }.tree-context li a span { display:block; background:#f0f0f0; margin:0 0 0 29px; padding-left:5px; }.tree-context li.separator { background:#f0f0f0; height:2px; line-height:2px; font-size:1px; border:0; margin:0; padding:0; }.tree-context li.separator span { display:block; margin:0px 0 0px 27px; height:1px; border-top:1px solid #e0e0e0; border-left:1px solid #e0e0e0; line-height:1px; font-size:1px; background:white; }.tree-context li a:hover { border:1px solid #d8f0fa; height:20px; line-height:20px; }.tree-context li a:hover span { background:#e7f4f9; margin-left:28px; }.tree-context li a:hover ins { background-color:#e7f4f9; border-color:#e7f4f9; border-width:2px 5px 2px 5px; }.tree-context li a.disabled { color:gray; }.tree-context li a.disabled ins { }.tree-context li a.disabled:hover { border:0; height:22px; line-height:22px; }.tree-context li a.disabled:hover span { background:#f0f0f0; margin-left:29px; }.tree-context li a.disabled:hover ins { border-color:#f0f0f0; background-color:#f0f0f0; border-width:3px 5px 3px 6px; }';
|
||||
$.tree.plugins.contextmenu.css = this.add_sheet({ str: css });
|
||||
}
|
||||
},
|
||||
onrgtclk: function(n, t, e) {
|
||||
var opts = $.extend(true, {}, $.tree.plugins.contextmenu.defaults, t.settings.plugins.contextmenu);
|
||||
n = $(n);
|
||||
if (n.size() == 0) return;
|
||||
$.tree.plugins.contextmenu.data.t = t;
|
||||
if (!n.children("a:eq(0)").hasClass("clicked")) {
|
||||
$.tree.plugins.contextmenu.data.a = n;
|
||||
$.tree.plugins.contextmenu.data.r = true;
|
||||
n.children("a").addClass(opts.class_name);
|
||||
e.target.blur();
|
||||
}
|
||||
else {
|
||||
$.tree.plugins.contextmenu.data.r = false;
|
||||
$.tree.plugins.contextmenu.data.a = (t.selected_arr && t.selected_arr.length > 1) ? t.selected_arr : t.selected;
|
||||
}
|
||||
$.tree.plugins.contextmenu.show(n, t);
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
// return false; // commented out because you might want to do something in your own callback
|
||||
},
|
||||
onchange: function() { $.tree.plugins.contextmenu.hide(); },
|
||||
beforedata: function() { $.tree.plugins.contextmenu.hide(); },
|
||||
ondestroy: function() { $.tree.plugins.contextmenu.hide(); }
|
||||
}
|
||||
}
|
||||
});
|
||||
$(function() {
|
||||
$.tree.plugins.contextmenu.object.hide().appendTo("body");
|
||||
|
||||
$("#jstree-contextmenu a", $.tree.plugins.contextmenu.object[0])
|
||||
.live("click", function(event) {
|
||||
if (!$(this).hasClass("disabled")) {
|
||||
$.tree.plugins.contextmenu.exec.apply(null, [$(this).attr("rel")]);
|
||||
$.tree.plugins.contextmenu.hide();
|
||||
}
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
return false;
|
||||
})
|
||||
$(document).bind("mousedown", function(event) { if($(event.target).parents("#jstree-contextmenu").size() == 0) $.tree.plugins.contextmenu.hide(); });
|
||||
});
|
||||
$(document).bind("mousedown", function(event) { if ($(event.target).parents("#jstree-contextmenu").size() == 0) $.tree.plugins.contextmenu.hide(); });
|
||||
});
|
||||
})(jQuery);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -77,11 +77,11 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
function(h) {
|
||||
//get the iframe, and set the url
|
||||
var umbModal = _this._$(h.w);
|
||||
var umbModalContent = _this._$("iframe", umbModal);
|
||||
umbModalContent.html('').attr('src', _this._getUniqueUrl(url));
|
||||
umbModalContent.width(width);
|
||||
umbModalContent.height(showHeader ? height - 30 : height);
|
||||
umbModalContent.show();
|
||||
var iframe = _this._$("iframe", umbModal);
|
||||
iframe.attr('src', _this._getUniqueUrl(url));
|
||||
iframe.width(width);
|
||||
iframe.height(showHeader ? height - 30 : height);
|
||||
iframe.show();
|
||||
});
|
||||
},
|
||||
_open: function(name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback, onCreate) {
|
||||
@@ -139,7 +139,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
umbModal.css("left", newLeft);
|
||||
}
|
||||
|
||||
umbModal.show();
|
||||
umbModal.fadeIn(250);
|
||||
|
||||
if (typeof onCreate == "function") {
|
||||
onCreate.call(_this, h)
|
||||
@@ -167,7 +167,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
try {
|
||||
trigger = h.w.find("iframe").contents().find(closeTriggers[x]);
|
||||
}
|
||||
catch (err) {} //IE throws an exception when navigating iframes, but it stil works...
|
||||
catch (err) { } //IE throws an exception when navigating iframes, but it stil works...
|
||||
}
|
||||
}
|
||||
_this._obj.jqmAddClose(trigger);
|
||||
@@ -185,15 +185,16 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
var e = { modalContent: iframe.length > 0 ? iframe : umbModalContent, outVal: _this._rVal };
|
||||
onCloseCallback.call(_this, e);
|
||||
}
|
||||
h.w.hide();
|
||||
h.o.remove();
|
||||
//remove any iframes that might be in there
|
||||
if (iframe.length > 0) {
|
||||
umbModalContent.hide();
|
||||
umbModalContent.html('').attr('src', '');
|
||||
_this._obj.remove();
|
||||
}
|
||||
_this._close();
|
||||
|
||||
h.w.fadeOut(300, function() {
|
||||
//remove the modal objects and iframes if it's an iframe modal box
|
||||
if (iframe.length > 0) {
|
||||
iframe.attr('src', 'javascript:false;document.write(\'\');');
|
||||
_this._obj.remove();
|
||||
}
|
||||
h.o.remove();
|
||||
_this._close();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -261,7 +262,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
"<div class=\"umbModalBoxHeader\"></div><a href=\"#\" class=\"umbracModalBoxClose jqmClose\">×</a>" +
|
||||
"<div class=\"umbModalBoxContent\">";
|
||||
if (withIFrame) {
|
||||
overlayHtml += "<iframe frameborder=\"0\" class=\"umbModalBoxIframe\" src=\"\"></iframe>";
|
||||
overlayHtml += "<iframe frameborder=\"0\" class=\"umbModalBoxIframe\" src=\"javascript:false;document.write(\'\');\"></iframe>";
|
||||
}
|
||||
overlayHtml += "</div></div>";
|
||||
return overlayHtml;
|
||||
|
||||
Reference in New Issue
Block a user