add widget resizing via jquery-ui-resizable in editor, fixed horizontal fader style (vertical centering)
This commit is contained in:
parent
56d30a411f
commit
0a985ff3c6
5 changed files with 38 additions and 2 deletions
|
|
@ -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],
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
6
app/browser/js/jquery/jquery.resizable.js
Normal file
6
app/browser/js/jquery/jquery.resizable.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue