classiccms 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ class Cms
9
9
  this.listen('/cms/edit', '.iki_IconEdit')
10
10
 
11
11
  listen: (url, button) ->
12
- $j(button).live 'click', (event) =>
12
+ $j(button).on 'click', (event) =>
13
13
  this.load url, $j(event.target).find(@input).val()
14
14
  load: (url, cms) ->
15
15
  $j.post url, {cms: cms}, (data) =>
@@ -82,12 +82,12 @@ class TopPanel
82
82
 
83
83
 
84
84
  create: (url) ->
85
- $j.post url, $j(@p.form + ':visible').serialize(), (data) =>
86
- if data == null
87
- window.location.reload()
88
- else
89
- $j.each data, (index, value)=>
90
- $j(@p.form).find("label[key=#{index}] p").text(value[0])
85
+ request = $j.ajax(url: url, type: 'POST', data: $j(@p.form + ':visible').serialize(), dataType: 'json')
86
+ request.fail =>
87
+ window.location.reload()
88
+ request.done (data) =>
89
+ $j.each data, (index, value)=>
90
+ $j(@p.form).find("label[key=#{index}] p").text(value[0])
91
91
 
92
92
  destroy: (url, id) ->
93
93
  $j.post url, {id: id}, ->
@@ -1,3 +1,3 @@
1
1
  module Classiccms #:nodoc
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
@@ -6,8 +6,8 @@
6
6
  %link{:rel=>'stylesheet', :href=>'/cms/css/style.css', :type=> 'text/css'}
7
7
 
8
8
 
9
- %script{:type=>'text/javascript', :src=>'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'}
10
- %script{:type=>'text/javascript', :src=>'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js'}
9
+ %script{:type=>'text/javascript', :src=>'http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js'}
10
+ %script{:type=>'text/javascript', :src=>'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js'}
11
11
  %script{:type=>'text/javascript', :src=>'/cms/js/ckeditor/ckeditor.js'}
12
12
  %script{:type=>'text/javascript', :src=>'/cms/js/ckeditor/adapters/jquery.js'}
13
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classiccms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-27 00:00:00.000000000 Z
12
+ date: 2013-07-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec