loft 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb9743cdf74ccbaeba6c950df7dd300cbf01366e
4
- data.tar.gz: 4c0eab2a4a70f0b97040990532c2d109abd41fb3
3
+ metadata.gz: d229fb260b365c12ff3b3ea01d22d46127a2ef0f
4
+ data.tar.gz: 2d134163274e9e5c1c2613e9f436a93cd6eea9a2
5
5
  SHA512:
6
- metadata.gz: e89aaeae7d1f9a4a8de33b35558b5302ac667254bb2c529764c5f8a9cb51e952e010ed678618e0199a78c8d27820f693d689381379fad26828e9e19a1ec060f7
7
- data.tar.gz: 8d9d873ea22d68690893052c4bb81c69beaf01179819d3b308625ae1ca3395e1977af1f15537f6e50307d4b99d3331a8ea13ec199f68fbac4e0af4b56abc076f
6
+ metadata.gz: 8888002fc78aa83f97d4a848bcc5f37745317070a3bead5d5d7d48992f37695de3fa735fd042f5a5369d53b85e230a50ca82746f5f8d88f30778da83181ede2d
7
+ data.tar.gz: 8629e3a75d48bb5bff41e699f13f30b01aaed2193590a1bbdfadb31a38df182171957fc6868ef8e1351e9f50cd39c937c559246f60affe03e227e808f4267d15
@@ -10,10 +10,13 @@
10
10
  # INPUT LOFT IMAGE
11
11
  # -----------------------------------------------------------------------------
12
12
  class @InputLoftImage extends InputString
13
- _addInput: ->
13
+
14
+ # PRIVATE ===============================================
15
+
16
+ _add_input: ->
14
17
  @config.placeholder ?= 'Image url'
15
18
 
16
- @$input =$ "<input type='string' name='#{ @name }' value='#{ @_valueSafe() }' id='#{ @name }' />"
19
+ @$input =$ "<input type='string' name='#{ @name }' value='#{ @_safe_value() }' id='#{ @name }' />"
17
20
  @$el.append @$input
18
21
  @$input.on 'change', (e) =>
19
22
  @updateValue($(e.target).val())
@@ -68,9 +71,7 @@ class @InputLoftImage extends InputString
68
71
  if @value == '' then @$el.removeClass('has-value') else @$el.addClass('has-value')
69
72
 
70
73
 
71
- #
72
- # PUBLIC
73
- #
74
+ # PUBLIC ================================================
74
75
 
75
76
  updateValue: (@value) ->
76
77
  @$input.val(@value)
@@ -80,7 +81,7 @@ class @InputLoftImage extends InputString
80
81
  @_update_input_class()
81
82
 
82
83
 
83
- _chrFormInputs['loft-image'] = InputLoftImage
84
+ chr.formInputs['loft-image'] = InputLoftImage
84
85
 
85
86
 
86
87
 
@@ -9,7 +9,7 @@
9
9
  # -----------------------------------------------------------------------------
10
10
  # Loft
11
11
  #
12
- # public methods:
12
+ # Public methods:
13
13
  # new Loft(title, @resource, @resourcePath)
14
14
  # showModal(assetType, @selectMultipleAssets, @onAcceptCallback)
15
15
  # closeModal()
@@ -56,7 +56,7 @@ class @Loft
56
56
  @module.rootList.$modalCloseBtn.on 'click', (e) => e.preventDefault() ; @closeModal()
57
57
 
58
58
  # enable grid mode as default on desktop/tablet
59
- if ! _isMobile()
59
+ if ! chr.isMobile()
60
60
  @module.$el.addClass('grid-mode')
61
61
 
62
62
 
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------
2
2
  # Author: Alexander Kravets <alex@slatestudio.com>,
3
- # Slate Studio (http://www.slatestudio.com)
3
+ # Slate Studio (http://www.slatestudio.com)
4
4
  #
5
5
  # Coding Guide:
6
6
  # https://github.com/thoughtbot/guides/tree/master/style/coffeescript
@@ -14,11 +14,10 @@ class @LoftTypeItem extends Item
14
14
  if @.$el.hasClass('active') then e.preventDefault() ; return
15
15
 
16
16
  if ! @module.$el.hasClass 'module-modal'
17
- window._skipHashchange = true
18
-
19
- location.hash = $(e.currentTarget).attr('href')
20
- crumbs = location.href.split('/')
17
+ hash = $(e.currentTarget).attr('href')
18
+ chr.updateHash(hash, true)
21
19
 
20
+ crumbs = hash.split('/')
22
21
  @module.showNestedList(_last(crumbs), true)
23
22
 
24
23
  else
@@ -1,9 +1,10 @@
1
- #= require chr/loft/group-actions
2
- #= require chr/loft/asset-item
3
- #= require chr/loft/type-item
4
- #= require chr/loft/module
5
- #= require chr/redactor/loft
6
- #= require chr/form/input-loft-image
1
+ #= require loft/group-actions
2
+ #= require loft/asset-item
3
+ #= require loft/type-item
4
+ #= require loft/module
5
+
6
+ #= require redactor-loft
7
+ #= require input-loft-image
7
8
 
8
9
  # TODOs:
9
10
  # - refactor group remove action
@@ -10,7 +10,7 @@
10
10
  # Redactor.js Loft Plugin
11
11
  # -----------------------------------------------------------------------------
12
12
 
13
- if ! RedactorPlugins then @RedactorPlugins = {}
13
+ if ! @RedactorPlugins then @RedactorPlugins = {}
14
14
 
15
15
  RedactorPlugins.loft = ->
16
16
  methods =
data/lib/loft/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Loft
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/loft.gemspec CHANGED
@@ -10,10 +10,10 @@ Gem::Specification.new do |s|
10
10
  s.email = 'alex@slatestudio.com'
11
11
  s.license = 'MIT'
12
12
  s.homepage = 'http://slatestudio.com'
13
- s.summary = 'Character CMS media assets plugin.'
13
+ s.summary = 'Media assets manager for Character CMS'
14
14
  s.description = <<-DESC
15
- This Character CMS plugin adds an assets library that provides an
16
- easy way to upload, manage and insert files into documents.
15
+ This plugin adds an assets library that provides an easy way
16
+ to upload, manage and insert files into documents.
17
17
  DESC
18
18
 
19
19
  s.rubyforge_project = 'loft'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loft
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kravets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-31 00:00:00.000000000 Z
11
+ date: 2015-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid_search
@@ -81,8 +81,8 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.7.1
83
83
  description: |
84
- This Character CMS plugin adds an assets library that provides an
85
- easy way to upload, manage and insert files into documents.
84
+ This plugin adds an assets library that provides an easy way
85
+ to upload, manage and insert files into documents.
86
86
  email: alex@slatestudio.com
87
87
  executables: []
88
88
  extensions: []
@@ -95,13 +95,13 @@ files:
95
95
  - README.md
96
96
  - Rakefile
97
97
  - app/assets/images/loft/library@3x.png
98
- - app/assets/javascripts/chr/form/input-loft-image.coffee
99
- - app/assets/javascripts/chr/loft/asset-item.coffee
100
- - app/assets/javascripts/chr/loft/group-actions.coffee
101
- - app/assets/javascripts/chr/loft/module.coffee
102
- - app/assets/javascripts/chr/loft/type-item.coffee
103
- - app/assets/javascripts/chr/redactor/loft.coffee
98
+ - app/assets/javascripts/input-loft-image.coffee
104
99
  - app/assets/javascripts/loft.coffee
100
+ - app/assets/javascripts/loft/asset-item.coffee
101
+ - app/assets/javascripts/loft/group-actions.coffee
102
+ - app/assets/javascripts/loft/module.coffee
103
+ - app/assets/javascripts/loft/type-item.coffee
104
+ - app/assets/javascripts/redactor-loft.coffee
105
105
  - app/assets/stylesheets/_loft.scss
106
106
  - app/assets/stylesheets/chr/form/_input-loft-image.scss
107
107
  - app/uploaders/asset_file_uploader.rb
@@ -134,5 +134,5 @@ rubyforge_project: loft
134
134
  rubygems_version: 2.4.5
135
135
  signing_key:
136
136
  specification_version: 4
137
- summary: Character CMS media assets plugin.
137
+ summary: Media assets manager for Character CMS
138
138
  test_files: []