backboneAX 0.0.9 → 0.0.10

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.
data/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # backboneAX - Backbone Application Extension
2
+
3
+ This is a set of backbone extensions that have help make my backbone projects easier to maintain. Hope it helps you too.
4
+
5
+ ## Classes
6
+
7
+ ### Bx.Model.Base
8
+
9
+ Extends the Backbone.Model class to let me know the connection state of the class
10
+
11
+ ### Bx.Collection.Base
12
+
13
+ - Extends the Backbone.Collection class to let me know the connection state of the class.
14
+ - Supports fetchOnce which will not retry a fetch if one has already been called
15
+
16
+
17
+ ### Bx.Collection.Paginate
18
+
19
+ - Pagination.
20
+
21
+ ### Bx.View.Base
22
+
23
+ - Manages child view creation and releasing.
24
+ - Setting data from models to views of templates
25
+ - Setting and getting of form data
26
+
27
+ ### Pooled data objects
28
+
29
+ - Bx.Pool.Hash
30
+ - Bx.Pool.Array
31
+ - Bx.Pool.Model
32
+ - Bx.Pool.Collection
@@ -1,3 +1,3 @@
1
1
  module BackboneAX
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
@@ -5,3 +5,22 @@ $.dateRawFormat = (date)->
5
5
  return null unless date?
6
6
  date.toString("yyyyMMddHHmm")
7
7
 
8
+ $.dateFormatRaw = (value)->
9
+ return null unless value?
10
+ switch format
11
+ when "raw"
12
+ value
13
+ when "dateLong"
14
+ Date.parseExact(value, "yyyyMMddHHmm").toString("dddd MMMM d, yyyy")
15
+ when "dateUSA"
16
+ Date.parseExact(value, "yyyyMMddHHmm").toString("MM/dd/yyyy")
17
+ when "date"
18
+ Date.parseExact(value, "yyyyMMddHHmm").toString("d MMM yy")
19
+ when "timeLong"
20
+ Date.parseExact(value, "yyyyMMddHHmm").toString("h:mm tt")
21
+ when "time"
22
+ Date.parseExact(value, "yyyyMMddHHmm").toString("HH:mm")
23
+ when "dateTimeLong"
24
+ Date.parseExact(value, "yyyyMMddHHmm").toString("dddd MMMM d, yyyy h:mm tt")
25
+ else
26
+ Date.parseExact(value, "yyyyMMddHHmm").toString("d MMM yyyy")
@@ -52,24 +52,5 @@ class Bx.Model.Base extends Backbone.Model
52
52
  isConnected: () ->
53
53
  @_conn_state == "connected"
54
54
 
55
-
56
55
  getDate: (attr, format = null) ->
57
- value = @get(attr)
58
- return null unless value?
59
- switch format
60
- when "raw"
61
- value
62
- when "dateLong"
63
- Date.parseExact(value, "yyyyMMddHHmm").toString("dddd MMMM d, yyyy")
64
- when "dateUSA"
65
- Date.parseExact(value, "yyyyMMddHHmm").toString("MM/dd/yyyy")
66
- when "date"
67
- Date.parseExact(value, "yyyyMMddHHmm").toString("d MMM yy")
68
- when "timeLong"
69
- Date.parseExact(value, "yyyyMMddHHmm").toString("h:mm tt")
70
- when "time"
71
- Date.parseExact(value, "yyyyMMddHHmm").toString("HH:mm")
72
- when "dateTimeLong"
73
- Date.parseExact(value, "yyyyMMddHHmm").toString("dddd MMMM d, yyyy h:mm tt")
74
- else
75
- Date.parseExact(value, "yyyyMMddHHmm").toString("d MMM yyyy")
56
+ $.dateFormatRaw(@get(attr))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backboneAX
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
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-03-09 00:00:00.000000000 Z
12
+ date: 2012-03-18 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: backbone Application Extensions for cleaner application development
15
15
  email:
@@ -20,6 +20,7 @@ extra_rdoc_files: []
20
20
  files:
21
21
  - .gitignore
22
22
  - Gemfile
23
+ - README.md
23
24
  - Rakefile
24
25
  - backboneAX.gemspec
25
26
  - lib/backboneAX.rb
@@ -51,7 +52,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
52
  version: '0'
52
53
  segments:
53
54
  - 0
54
- hash: -4314935065340217309
55
+ hash: -2479858144200238514
55
56
  required_rubygems_version: !ruby/object:Gem::Requirement
56
57
  none: false
57
58
  requirements:
@@ -60,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
61
  version: '0'
61
62
  segments:
62
63
  - 0
63
- hash: -4314935065340217309
64
+ hash: -2479858144200238514
64
65
  requirements: []
65
66
  rubyforge_project: backboneAX
66
67
  rubygems_version: 1.8.17