add widget resizing via jquery-ui-resizable in editor, fixed horizontal fader style (vertical centering)

This commit is contained in:
bordun 2016-02-13 17:12:44 +01:00
parent 56d30a411f
commit 0a985ff3c6
5 changed files with 38 additions and 2 deletions

View file

@ -29,12 +29,14 @@ enableEditor = function(){
e.preventDefault()
e.stopPropagation()
var container = $(this),
parent = container.parent(),
index = container.index(),
data = getdata(container),
form = $('<div class="form"></div>')
$('.editing').removeClass('editing')
container.addClass('editing')
@ -54,9 +56,19 @@ enableEditor = function(){
newContainer.children().first().click()
$('#sidepanel').scrollTop(scroll)
}
$('.widget.ui-resizable').resizable('destroy')
$(this).resizable({
handles:'se',
helper: "resizable-helper",
stop: function( event, ui ) {
data.height = ui.size.height
data.width = ui.size.width
updateWidget()
}
})
for (i in data) {
if (i!='widgets' && i!='tabs') {
var type = typeof data[i],

View file

@ -11,6 +11,7 @@ window.$ = window.jQuery = require('./jquery/jquery.min.js')
require('./jquery/jquery.sortable.js')
require('./jquery/jquery.drag.js')
require('./jquery/jquery.resize.js')
require('./jquery/jquery.resizable.js')
// main js
require('./app/app.js')

File diff suppressed because one or more lines are too long