lib/classiccms/public/js/index.coffee in classiccms-0.6.3 vs lib/classiccms/public/js/index.coffee in classiccms-0.6.4
- old
+ new
@@ -34,10 +34,11 @@
order[index] = $j(item).attr('sort')
$j.post '/cms/sort', {section: section, order: order}
}
class Image
+ #needs a rewrite
constructor: (input) ->
@input = input
@p =
images: '#iki #edit_bg .images'
image: '#iki #edit_bg .images .image img'
@@ -46,17 +47,17 @@
window.open('/cms/ckeditor/files?input='+$(@input).attr('id'),'upload','width=960,height=750,left=200,top=100,screenX=200,screenY=100')
@listen()
listen: ->
- $j('#edit_bg').slideUp()
- $j.get '/cms/images', (data) =>
- @form = $j('#edit_bg')
- $j('#edit_bg').after(data)
- @set_upload_button()
- $j('#' + @input.val()).addClass('selected')
- @select()
- @destroy()
+ #$j('#edit_bg').slideUp()
+ #$j.get '/cms/images', (data) =>
+ # @form = $j('#edit_bg')
+ # $j('#edit_bg').after(data)
+ # @set_upload_button()
+ # $j('#' + @input.val()).addClass('selected')
+ # @select()
+ # @destroy()
destroy: () ->
$j(@p.images + ' .image').live 'mouseover mouseout', (event) =>
if (event.type == 'mouseover')
$j(event.currentTarget).find('.destroy').show()