draggable works, clean up jquery noconflict behaviour, remove un-needed plugins
This commit is contained in:
parent
d8fa8b4f71
commit
045664b54f
|
@ -1,4 +1,42 @@
|
||||||
(function($) {
|
(function($) {
|
||||||
|
|
||||||
|
|
||||||
|
Aloha.ready(function() {
|
||||||
|
var $aloha = Aloha.jQuery;
|
||||||
|
$aloha('.textbox_canvas_content').aloha();
|
||||||
|
|
||||||
|
Aloha.bind("aloha-smart-content-changed", function(e, obj) {
|
||||||
|
//var $editable = $(obj.editable.obj);
|
||||||
|
//console.log(e, obj);
|
||||||
|
var edited_obj = jQuery(obj.editable.obj);
|
||||||
|
var html = edited_obj.html();
|
||||||
|
var boxJq = edited_obj.parents('.box');
|
||||||
|
var boxIndex = parseInt(boxJq.attr("data-index"));
|
||||||
|
var canvasIndex = boxJq.parents('.canvas').attr("data-index");
|
||||||
|
if (boxJq.hasClass("textBox")) {
|
||||||
|
var thisBox = edgeArticle[canvasIndex].textBoxes[boxIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
thisBox.setHTML(html);
|
||||||
|
|
||||||
|
// console.log($editable.attr("data-field"));
|
||||||
|
});
|
||||||
|
|
||||||
|
Aloha.bind("aloha-editable-activated", function(event, properties) {
|
||||||
|
var thisElem = properties.editable;
|
||||||
|
var thisBox = $(thisElem.obj).parents(".box");
|
||||||
|
thisBox.draggable("disable");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Aloha.bind("aloha-editable-deactivated", function(event, properties) {
|
||||||
|
var thisElem = properties.editable;
|
||||||
|
var thisBox = $(thisElem.obj).parents(".box");
|
||||||
|
thisBox.draggable("enable");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
//var ARTICLE_ID = 0;
|
//var ARTICLE_ID = 0;
|
||||||
var BASE_URL = "http://edgwareroad.org/edit/"
|
var BASE_URL = "http://edgwareroad.org/edit/"
|
||||||
var edgeArticle = window.edgeArticle = [];
|
var edgeArticle = window.edgeArticle = [];
|
||||||
|
@ -662,6 +700,7 @@ TextBox.prototype.init = function() {
|
||||||
// thisBox.updateCSS(css);
|
// thisBox.updateCSS(css);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//Aloha.jQuery(e).find(".textbox_canvas_content").aloha();
|
||||||
return e;
|
return e;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,29 +33,23 @@
|
||||||
common/table,
|
common/table,
|
||||||
common/list,
|
common/list,
|
||||||
common/link,
|
common/link,
|
||||||
common/highlighteditables,
|
|
||||||
common/undo,
|
common/undo,
|
||||||
common/contenthandler,
|
common/contenthandler,
|
||||||
common/paste,
|
common/paste,
|
||||||
extra/cite,
|
|
||||||
common/characterpicker,
|
common/characterpicker,
|
||||||
common/commands,
|
common/commands,
|
||||||
common/block,
|
common/block,
|
||||||
common/image,
|
|
||||||
common/abbr,
|
common/abbr,
|
||||||
common/horizontalruler,
|
common/horizontalruler,
|
||||||
common/align,
|
common/align,
|
||||||
extra/formatlesspaste,
|
extra/formatlesspaste,
|
||||||
extra/toc,
|
|
||||||
extra/headerids,
|
extra/headerids,
|
||||||
extra/listenforcer,
|
extra/listenforcer,
|
||||||
extra/metaview,
|
extra/metaview,
|
||||||
extra/numerated-headers,
|
extra/numerated-headers,
|
||||||
extra/ribbon,
|
extra/ribbon,
|
||||||
extra/wai-lang,
|
|
||||||
extra/flag-icons,
|
extra/flag-icons,
|
||||||
extra/linkbrowser,
|
extra/linkbrowser,
|
||||||
extra/imagebrowser,
|
|
||||||
extra/cite"></script>
|
extra/cite"></script>
|
||||||
<script>
|
<script>
|
||||||
Aloha.settings.jQuery = $.noConflict();
|
Aloha.settings.jQuery = $.noConflict();
|
||||||
|
@ -93,12 +87,12 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script language="Javascript">
|
<script language="text/javascript">
|
||||||
|
(function($) {
|
||||||
jQuery(function(){
|
$(function(){
|
||||||
jQuery('img').Jcrop();
|
$('img').Jcrop();
|
||||||
});
|
});
|
||||||
|
})(jQuery);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user