spiderfw 0.5.15 → 0.5.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/CHANGELOG +7 -0
  2. data/VERSION +1 -1
  3. data/apps/core/auth/data/locale/it/LC_MESSAGES/spider_auth.mo +0 -0
  4. data/apps/core/auth/po/it/spider_auth.po +8 -5
  5. data/apps/core/auth/po/spider_auth.pot +2 -2
  6. data/apps/core/components/data/locale/it/LC_MESSAGES/spider_components.mo +0 -0
  7. data/apps/core/components/po/it/spider_components.po +11 -7
  8. data/apps/core/components/po/spider_components.pot +9 -5
  9. data/apps/core/components/public/js/spider.js +19 -0
  10. data/apps/core/components/widgets/month_calendar/month_calendar.rb +16 -9
  11. data/apps/core/forms/data/locale/it/LC_MESSAGES/spider_forms.mo +0 -0
  12. data/apps/core/forms/po/it/spider_forms.po +18 -5
  13. data/apps/core/forms/po/spider_forms.pot +16 -4
  14. data/apps/master/po/master.pot +400 -0
  15. data/apps/messenger/data/locale/it/LC_MESSAGES/spider_messenger.mo +0 -0
  16. data/apps/messenger/po/it/spider_messenger.po +48 -8
  17. data/apps/messenger/po/spider_messenger.pot +39 -3
  18. data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
  19. data/lib/spiderfw/app.rb +16 -15
  20. data/lib/spiderfw/cmd/commands/app.rb +60 -0
  21. data/lib/spiderfw/controller/controller.rb +5 -1
  22. data/lib/spiderfw/controller/controller_mixin.rb +1 -0
  23. data/lib/spiderfw/controller/dispatcher.rb +1 -0
  24. data/lib/spiderfw/controller/mixins/visual.rb +16 -8
  25. data/lib/spiderfw/home.rb +3 -2
  26. data/lib/spiderfw/i18n/javascript_parser.rb +1 -1
  27. data/lib/spiderfw/model/base_model.rb +16 -6
  28. data/lib/spiderfw/model/mappers/db_mapper.rb +2 -2
  29. data/lib/spiderfw/model/mappers/mapper.rb +7 -2
  30. data/lib/spiderfw/model/query.rb +11 -1
  31. data/lib/spiderfw/setup/app_manager.rb +60 -0
  32. data/lib/spiderfw/templates/blocks/widget.rb +1 -1
  33. data/lib/spiderfw/utils/annotations.rb +1 -1
  34. data/lib/spiderfw/widget/widget.rb +12 -1
  35. data/lib/spiderfw/widget/widget_plugin.rb +15 -1
  36. data/lib/spiderfw.rb +46 -51
  37. metadata +8 -4
data/CHANGELOG CHANGED
@@ -1,3 +1,10 @@
1
+ = 0.5.16
2
+ == 07 December, 2010
3
+ * Added app update command
4
+ * Fixed templates extension for overridden templates
5
+ * Added Query#only_one, BaseModel#_check_if_saved
6
+ * Bugfixes
7
+
1
8
  = 0.5.15
2
9
  == 26 November, 2010
3
10
  * BaseModel.from_hash_dump, :reverse option in extend_model
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.15
1
+ 0.5.16
@@ -6,7 +6,7 @@
6
6
  msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: Spider::Auth 0.1\n"
9
- "POT-Creation-Date: 2010-11-02 18:12+0100\n"
9
+ "POT-Creation-Date: 2010-11-29 12:48+0100\n"
10
10
  "PO-Revision-Date: 2010-11-02 18:13+0100\n"
11
11
  "Last-Translator: Ivan Pirlik <ivan.pirlik@soluzionipa.it>\n"
12
12
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,8 +20,12 @@ msgid "Please login first"
20
20
  msgstr "Per favore, esegui il login"
21
21
 
22
22
  #: models/digest_user.rb:17
23
- msgid "You must always supply the password to a DigestUser when updating username or realm"
24
- msgstr "È necessario sempre specificare la password di un DigestUser quando si modifica lo username o il realm"
23
+ msgid ""
24
+ "You must always supply the password to a DigestUser when updating username "
25
+ "or realm"
26
+ msgstr ""
27
+ "È necessario sempre specificare la password di un DigestUser quando si "
28
+ "modifica lo username o il realm"
25
29
 
26
30
  #: models/group.rb:11
27
31
  msgid "Label"
@@ -43,7 +47,7 @@ msgstr "Ultima login"
43
47
  msgid "Login count"
44
48
  msgstr "Numero login"
45
49
 
46
- #: models/mixins/rbac.rb:36
50
+ #: models/mixins/rbac_provider.rb:41
47
51
  msgid "%s permissions"
48
52
  msgstr "Permessi %s"
49
53
 
@@ -54,4 +58,3 @@ msgstr "Amministratore"
54
58
  #: models/super_user.rb:5
55
59
  msgid "Superusers"
56
60
  msgstr "Amministratori"
57
-
@@ -7,7 +7,7 @@
7
7
  msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: Spider::Auth 0.1\n"
10
- "POT-Creation-Date: 2010-11-02 18:12+0100\n"
10
+ "POT-Creation-Date: 2010-11-29 12:48+0100\n"
11
11
  "PO-Revision-Date: 2009-06-30 16:58+0200\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -46,7 +46,7 @@ msgstr ""
46
46
  msgid "Login count"
47
47
  msgstr ""
48
48
 
49
- #: models/mixins/rbac.rb:36
49
+ #: models/mixins/rbac_provider.rb:41
50
50
  msgid "%s permissions"
51
51
  msgstr ""
52
52
 
@@ -6,9 +6,9 @@
6
6
  msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: Spider::Components 0.1\n"
9
- "POT-Creation-Date: 2010-10-04 14:43+0200\n"
10
- "PO-Revision-Date: 2010-10-04 17:14+0100\n"
11
- "Last-Translator: Ivan Pirlik <ivan.pirlik@gmail.com>\n"
9
+ "POT-Creation-Date: 2010-11-29 12:48+0100\n"
10
+ "PO-Revision-Date: 2010-11-29 12:51+0100\n"
11
+ "Last-Translator: Ivan Pirlik <ivan.pirlik@soluzionipa.it>\n"
12
12
  "Language-Team: LANGUAGE <LL@li.org>\n"
13
13
  "MIME-Version: 1.0\n"
14
14
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -19,15 +19,19 @@ msgstr ""
19
19
  msgid "Administration"
20
20
  msgstr "Amministrazione"
21
21
 
22
+ #: widgets/admin/admin.rb:37
23
+ msgid "Manage Data"
24
+ msgstr "Gestisci i Dati"
25
+
22
26
  #: widgets/admin/admin.rb:42
23
27
  msgid "guest"
24
28
  msgstr "ospite"
25
29
 
26
- #: widgets/crud/crud.rb:94
30
+ #: widgets/crud/crud.rb:95
27
31
  msgid "Cancel"
28
32
  msgstr "Annulla"
29
33
 
30
- #: widgets/crud/crud.rb:95
34
+ #: widgets/crud/crud.rb:96
31
35
  msgid "Ok"
32
36
  msgstr "Ok"
33
37
 
@@ -52,11 +56,11 @@ msgstr "Nessun elemento"
52
56
  msgid "Delete"
53
57
  msgstr "Elimina"
54
58
 
55
- #: public/js/utils.js:8
59
+ #: public/js/utils.js:9
56
60
  msgid "Are you sure?"
57
61
  msgstr "Sei sicuro?"
58
62
 
59
- #: public/js/utils.js:11
63
+ #: public/js/utils.js:14
60
64
  msgid "Yes"
61
65
  msgstr "Sì"
62
66
 
@@ -7,7 +7,7 @@
7
7
  msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: Spider::Components 0.1\n"
10
- "POT-Creation-Date: 2010-10-04 14:43+0200\n"
10
+ "POT-Creation-Date: 2010-11-29 12:48+0100\n"
11
11
  "PO-Revision-Date: 2009-06-30 16:58+0200\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,15 +20,19 @@ msgstr ""
20
20
  msgid "Administration"
21
21
  msgstr ""
22
22
 
23
+ #: widgets/admin/admin.rb:37
24
+ msgid "Manage Data"
25
+ msgstr ""
26
+
23
27
  #: widgets/admin/admin.rb:42
24
28
  msgid "guest"
25
29
  msgstr ""
26
30
 
27
- #: widgets/crud/crud.rb:94
31
+ #: widgets/crud/crud.rb:95
28
32
  msgid "Cancel"
29
33
  msgstr ""
30
34
 
31
- #: widgets/crud/crud.rb:95
35
+ #: widgets/crud/crud.rb:96
32
36
  msgid "Ok"
33
37
  msgstr ""
34
38
 
@@ -52,11 +56,11 @@ msgstr ""
52
56
  msgid "Delete"
53
57
  msgstr ""
54
58
 
55
- #: public/js/utils.js:8
59
+ #: public/js/utils.js:9
56
60
  msgid "Are you sure?"
57
61
  msgstr ""
58
62
 
59
- #: public/js/utils.js:11
63
+ #: public/js/utils.js:14
60
64
  msgid "Yes"
61
65
  msgstr ""
62
66
 
@@ -641,6 +641,25 @@ jQuery.parseISODate = function(iso){
641
641
  else return null;
642
642
  };
643
643
 
644
+ if (!Date.prototype.toISOString){
645
+ Date.prototype.toISOString = (function(){
646
+ function t(i){return i<10?"0"+i:i;};
647
+ function h(i){return i.length<2?"00"+i:i.length<3?"0"+i:3<i.length?Math.round(i/Math.pow(10,i.length-3)):i;};
648
+ return function(){
649
+ return "".concat(
650
+ this.getUTCFullYear(), "-",
651
+ t(this.getUTCMonth() + 1), "-",
652
+ t(this.getUTCDate()), "T",
653
+ t(this.getUTCHours()), ":",
654
+ t(this.getUTCMinutes()), ":",
655
+ t(this.getUTCSeconds()), ".",
656
+ h("" + this.getUTCMilliseconds()), "Z"
657
+ );
658
+ };
659
+ })();
660
+ }
661
+
662
+
644
663
  Spider.EventTarget = {
645
664
  bind: function(eventName, callback){
646
665
  if (!this.events) this.events = {};
@@ -3,21 +3,21 @@ module Spider; module Components
3
3
  class MonthCalendar < Spider::Widget
4
4
  tag 'month_calendar'
5
5
 
6
- attribute :start_month, :type => Fixnum
7
- attribute :start_year, :type => Fixnum
8
- attr_accessor :busy
6
+ i_attr_accessor :start_month, :type => Fixnum
7
+ i_attr_accessor :start_year, :type => Fixnum
8
+ is_attr_accessor :busy
9
9
 
10
10
  def prepare
11
11
  super
12
12
  today = Date.today
13
- start_month = attributes[:start_month] || today.month
14
- start_year = attributes[:start_year] || today.year
13
+ @start_month ||= today.month
14
+ @start_year ||= today.year
15
15
  if params['d'] && params['d'] =~ /(\d{4})\/(\d{1,2})/
16
16
  @month = $2.to_i
17
17
  @year = $1.to_i
18
18
  else
19
- @month = start_month
20
- @year = start_year
19
+ @month = @start_month
20
+ @year = @start_year
21
21
  end
22
22
  @busy ||= {}
23
23
  end
@@ -54,12 +54,19 @@ module Spider; module Components
54
54
  @scene.rows[row] = []
55
55
  end
56
56
  classes = []
57
- classes << 'busy' if @busy[year] && @busy[year][month] && @busy[year][month][i]
58
- @scene.rows[row][col] = {:day => i, :classes => classes}
57
+ is_busy = @busy[year] && @busy[year][month] && @busy[year][month][i]
58
+ classes << 'busy' if is_busy
59
+ @scene.rows[row][col] = {:day => i, :classes => classes, :busy => is_busy, :current_month => true}
59
60
  end
60
61
  (col+1).upto(6){ |i| @scene.rows[row][i] = {:day => i - col, :classes => ['next-month'] } }
61
62
  end
62
63
 
64
+ def set_busy_date(d)
65
+ @busy ||= {}
66
+ @busy[d.year] ||= {}
67
+ @busy[d.year][d.month] ||= {}
68
+ @busy[d.year][d.month][d.day] = true
69
+ end
63
70
 
64
71
 
65
72
  end
@@ -6,8 +6,8 @@
6
6
  msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: Spider::Forms 0.1\n"
9
- "POT-Creation-Date: 2010-04-22 18:59+0200\n"
10
- "PO-Revision-Date: 2010-03-11 11:36+0100\n"
9
+ "POT-Creation-Date: 2010-11-29 12:48+0100\n"
10
+ "PO-Revision-Date: 2010-11-29 12:52+0100\n"
11
11
  "Last-Translator: Ivan Pirlik <ivan.pirlik@soluzionipa.it>\n"
12
12
  "Language-Team: LANGUAGE <LL@li.org>\n"
13
13
  "MIME-Version: 1.0\n"
@@ -31,7 +31,7 @@ msgstr "%s e nuovo"
31
31
  msgid "%s and stay"
32
32
  msgstr "%s e rimani"
33
33
 
34
- #: widgets/inputs/date_time/date_time.rb:17
34
+ #: widgets/inputs/date_time/date_time.rb:22
35
35
  msgid "%s is not a valid date"
36
36
  msgstr "%s non è una data valida"
37
37
 
@@ -39,10 +39,23 @@ msgstr "%s non è una data valida"
39
39
  msgid "%s is required"
40
40
  msgstr "Il campo %s è obbligatorio"
41
41
 
42
- #: widgets/inputs/file_input/file_input.shtml:6
42
+ #: widgets/inputs/file_input/file_input.shtml:7
43
43
  msgid "Clear"
44
44
  msgstr "Pulisci"
45
45
 
46
- #: widgets/inputs/file_input/file_input.shtml:8
46
+ #: widgets/inputs/file_input/file_input.shtml:9
47
47
  msgid "Change"
48
48
  msgstr "Cambia"
49
+
50
+ #: widgets/inputs/time_span/time_span.shtml:4
51
+ msgid "Seconds"
52
+ msgstr "Secondi"
53
+
54
+ #: widgets/inputs/time_span/time_span.shtml:5
55
+ msgid "Minutes"
56
+ msgstr "Minuti"
57
+
58
+ #: widgets/inputs/time_span/time_span.shtml:6
59
+ msgid "Hours"
60
+ msgstr "Ore"
61
+
@@ -7,7 +7,7 @@
7
7
  msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: Spider::Forms 0.1\n"
10
- "POT-Creation-Date: 2010-04-22 18:59+0200\n"
10
+ "POT-Creation-Date: 2010-11-29 12:48+0100\n"
11
11
  "PO-Revision-Date: 2009-06-30 17:03+0200\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -32,7 +32,7 @@ msgstr ""
32
32
  msgid "%s and stay"
33
33
  msgstr ""
34
34
 
35
- #: widgets/inputs/date_time/date_time.rb:17
35
+ #: widgets/inputs/date_time/date_time.rb:22
36
36
  msgid "%s is not a valid date"
37
37
  msgstr ""
38
38
 
@@ -40,10 +40,22 @@ msgstr ""
40
40
  msgid "%s is required"
41
41
  msgstr ""
42
42
 
43
- #: widgets/inputs/file_input/file_input.shtml:6
43
+ #: widgets/inputs/file_input/file_input.shtml:7
44
44
  msgid "Clear"
45
45
  msgstr ""
46
46
 
47
- #: widgets/inputs/file_input/file_input.shtml:8
47
+ #: widgets/inputs/file_input/file_input.shtml:9
48
48
  msgid "Change"
49
49
  msgstr ""
50
+
51
+ #: widgets/inputs/time_span/time_span.shtml:4
52
+ msgid "Seconds"
53
+ msgstr ""
54
+
55
+ #: widgets/inputs/time_span/time_span.shtml:5
56
+ msgid "Minutes"
57
+ msgstr ""
58
+
59
+ #: widgets/inputs/time_span/time_span.shtml:6
60
+ msgid "Hours"
61
+ msgstr ""