classiccms 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/classiccms/public/js/images.coffee +6 -4
- data/lib/classiccms/public/js/index.coffee +9 -8
- data/lib/classiccms/scaffold/config/application.rb +4 -1
- data/lib/classiccms/scaffold/config.ru +1 -1
- data/lib/classiccms/version.rb +1 -1
- data/lib/classiccms/views/cms/ckeditor.haml +1 -0
- data/lib/classiccms/views/cms/form.haml +4 -1
- metadata +2 -2
@@ -6,6 +6,7 @@ $ ->
|
|
6
6
|
|
7
7
|
class Browser
|
8
8
|
constructor: ->
|
9
|
+
@input = $('#input').first().val()
|
9
10
|
@p =
|
10
11
|
images: '.images'
|
11
12
|
image: 'img'
|
@@ -34,13 +35,14 @@ class Browser
|
|
34
35
|
$('.'+id).show()
|
35
36
|
|
36
37
|
select: () ->
|
37
|
-
$('.item').click
|
38
|
-
|
39
|
-
|
38
|
+
$('.item').click (event)=>
|
39
|
+
url = $(event.currentTarget).attr('url')
|
40
|
+
input = $('input[name=return]').first().val()
|
40
41
|
if input.length > 0
|
41
42
|
window.opener.CKEDITOR.tools.callFunction(input, url)
|
42
43
|
else
|
43
|
-
window.opener.$('#
|
44
|
+
window.opener.$('#' + @input).first().val($(event.currentTarget).attr('id'))
|
45
|
+
window.opener.$("##{@input}_preview img").attr('src', $(event.currentTarget).attr('src'))
|
44
46
|
self.close()
|
45
47
|
|
46
48
|
destroy: () ->
|
@@ -36,6 +36,7 @@ class Sort
|
|
36
36
|
}
|
37
37
|
|
38
38
|
class Image
|
39
|
+
#needs a rewrite
|
39
40
|
constructor: (input) ->
|
40
41
|
@input = input
|
41
42
|
@p =
|
@@ -48,14 +49,14 @@ class Image
|
|
48
49
|
@listen()
|
49
50
|
|
50
51
|
listen: ->
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
52
|
+
#$j('#edit_bg').slideUp()
|
53
|
+
#$j.get '/cms/images', (data) =>
|
54
|
+
# @form = $j('#edit_bg')
|
55
|
+
# $j('#edit_bg').after(data)
|
56
|
+
# @set_upload_button()
|
57
|
+
# $j('#' + @input.val()).addClass('selected')
|
58
|
+
# @select()
|
59
|
+
# @destroy()
|
59
60
|
|
60
61
|
destroy: () ->
|
61
62
|
$j(@p.images + ' .image').live 'mouseover mouseout', (event) =>
|
data/lib/classiccms/version.rb
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
/%link{:rel=>'stylesheet', :href=>'/cms/css/style.css', :type=> 'text/css'}
|
14
14
|
/%link{:rel=>'stylesheet', :href=>'/cms/css/images.css', :type=> 'text/css'}
|
15
15
|
%body#iki
|
16
|
+
%input{:type => 'hidden', :id => 'input', :value => params[:input]}
|
16
17
|
.container{:style => 'margin-top: 20px'}
|
17
18
|
.row
|
18
19
|
.span4
|
@@ -29,7 +29,10 @@
|
|
29
29
|
= select_options info.options[:options], record[key]
|
30
30
|
- when 'image'
|
31
31
|
%p.image_select Selecteer image
|
32
|
-
%input{:type => 'hidden', :id =>
|
32
|
+
%input{:type => 'hidden', :id => "file_#{key}", :name=> name, :value => record[key]}
|
33
|
+
|
34
|
+
%p{:id => "file_#{key}_preview", :style => 'float:left; clear:left;'}
|
35
|
+
%img{:src => record.send(key).thumb('50x50').url}
|
33
36
|
|
34
37
|
- when 'images'
|
35
38
|
- if record.new_record?
|
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.6.
|
4
|
+
version: 0.6.4
|
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: 2012-10-
|
12
|
+
date: 2012-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|