loft 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/{chr/form/input-loft-image.coffee → input-loft-image.coffee} +7 -6
- data/app/assets/javascripts/{chr/loft → loft}/asset-item.coffee +0 -0
- data/app/assets/javascripts/{chr/loft → loft}/group-actions.coffee +0 -0
- data/app/assets/javascripts/{chr/loft → loft}/module.coffee +2 -2
- data/app/assets/javascripts/{chr/loft → loft}/type-item.coffee +4 -5
- data/app/assets/javascripts/loft.coffee +7 -6
- data/app/assets/javascripts/{chr/redactor/loft.coffee → redactor-loft.coffee} +1 -1
- data/lib/loft/version.rb +1 -1
- data/loft.gemspec +3 -3
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d229fb260b365c12ff3b3ea01d22d46127a2ef0f
|
4
|
+
data.tar.gz: 2d134163274e9e5c1c2613e9f436a93cd6eea9a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
13
|
+
|
14
|
+
# PRIVATE ===============================================
|
15
|
+
|
16
|
+
_add_input: ->
|
14
17
|
@config.placeholder ?= 'Image url'
|
15
18
|
|
16
|
-
@$input =$ "<input type='string' name='#{ @name }' value='#{ @
|
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
|
-
|
84
|
+
chr.formInputs['loft-image'] = InputLoftImage
|
84
85
|
|
85
86
|
|
86
87
|
|
File without changes
|
File without changes
|
@@ -9,7 +9,7 @@
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
# Loft
|
11
11
|
#
|
12
|
-
#
|
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 !
|
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
|
-
#
|
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
|
-
|
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
|
2
|
-
#= require
|
3
|
-
#= require
|
4
|
-
#= require
|
5
|
-
|
6
|
-
#= require
|
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
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 = '
|
13
|
+
s.summary = 'Media assets manager for Character CMS'
|
14
14
|
s.description = <<-DESC
|
15
|
-
This
|
16
|
-
|
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.
|
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-
|
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
|
85
|
-
|
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/
|
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:
|
137
|
+
summary: Media assets manager for Character CMS
|
138
138
|
test_files: []
|