Sorting controls styling improvement and small bug fixed
This commit is contained in:
@@ -217,7 +217,7 @@
|
||||
display:block;
|
||||
|
||||
border: 1px dashed rgba(255, 0, 0, .0);
|
||||
border-bottom-width: 2px;
|
||||
border-bottom-width: 1px;
|
||||
|
||||
-webkit-background-clip: padding-box; /* for Safari */
|
||||
background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */
|
||||
@@ -225,13 +225,13 @@
|
||||
|
||||
.usky-grid .usky-control:hover{
|
||||
/*border: 1px solid rgba(182, 182, 182, 0.3);*/
|
||||
border-bottom: 2px solid rgba(182, 182, 182, 0.3);
|
||||
border-bottom: 1px solid rgba(182, 182, 182, 0.3);
|
||||
|
||||
}
|
||||
|
||||
.usky-grid .usky-control-placeholder:hover{
|
||||
/*border: 1px solid rgba(182, 182, 182, 0);*/
|
||||
border-bottom:2px solid rgba(182, 182, 182, 0.0) !important;
|
||||
border-bottom:1px solid rgba(182, 182, 182, 0.0) !important;
|
||||
}
|
||||
|
||||
.usky-grid .removingControl{
|
||||
@@ -301,7 +301,7 @@
|
||||
border: none;
|
||||
background: #fff;
|
||||
outline: none;
|
||||
width: 99%;
|
||||
width: 98%;
|
||||
resize: none;
|
||||
color: @gray;
|
||||
}
|
||||
@@ -316,7 +316,7 @@
|
||||
border: none;
|
||||
background: #fff;
|
||||
outline: none;
|
||||
width: 99%;
|
||||
width: 98%;
|
||||
resize: none;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@@ -35,11 +35,7 @@ angular.module("umbraco")
|
||||
|
||||
};
|
||||
|
||||
var includedRte = [];
|
||||
var allowedEditors = [];
|
||||
var currentEditor = "";
|
||||
var rteUpdateDone = false;
|
||||
|
||||
var cancelMove = false;
|
||||
$scope.sortableOptionsCell = {
|
||||
|
||||
distance: 10,
|
||||
@@ -55,30 +51,26 @@ angular.module("umbraco")
|
||||
|
||||
console.info(allowedEditors)
|
||||
|
||||
if ($.inArray(currentEditor, allowedEditors) < 0 && allowedEditors) {
|
||||
if ($.inArray(ui.item.scope().control.editor.alias, allowedEditors) < 0 && allowedEditors) {
|
||||
ui.placeholder.hide();
|
||||
cancelMove = true;
|
||||
}
|
||||
else {
|
||||
ui.placeholder.show();
|
||||
cancelMove = false;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
update: function (event, ui) {
|
||||
|
||||
if (!ui.sender) {
|
||||
|
||||
if ($.inArray(currentEditor, allowedEditors) < 0 && allowedEditors) {
|
||||
if (cancelMove) {
|
||||
ui.item.sortable.cancel();
|
||||
}
|
||||
|
||||
ui.item.parents(".usky-cell").find('.mceNoEditor').each(function () {
|
||||
tinyMCE.execCommand('mceRemoveEditor', false, $(this).attr('id'));
|
||||
tinyMCE.execCommand('mceAddEditor', false, $(this).attr('id'));
|
||||
});
|
||||
|
||||
rteUpdateDone = true;
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -102,18 +94,21 @@ angular.module("umbraco")
|
||||
},
|
||||
|
||||
start: function (e, ui) {
|
||||
currentEditor = ui.item.scope().control.editor.alias;
|
||||
ui.item.find('.mceNoEditor').each(function () {
|
||||
tinyMCE.execCommand('mceRemoveEditor', false, $(this).attr('id'))
|
||||
});
|
||||
},
|
||||
|
||||
stop: function (e, ui) {
|
||||
//ui.item.parents(".usky-cell").find('.mceNoEditor').each(function () {
|
||||
// tinyMCE.execCommand('mceRemoveEditor', false, $(this).attr('id'));
|
||||
// tinyMCE.execCommand('mceAddEditor', false, $(this).attr('id'));
|
||||
//});
|
||||
ui.item.parents(".usky-cell").find('.mceNoEditor').each(function () {
|
||||
var id = $(this).attr('id')
|
||||
tinyMCE.execCommand('mceRemoveEditor', false, id);
|
||||
$timeout(function () {
|
||||
tinyMCE.execCommand('mceAddEditor', false, id);
|
||||
}, 200, false);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user