lipsiadmin 5.0.8 → 5.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,14 @@
1
+ 2009-12-1
2
+ * Bump to 5.0.9
3
+ * Fixed an error in lipsiadmin default locales
4
+ * Added Template Paths for grids and custom template for grid [Ragunalth]
5
+ * Added German Translations [Peter]
6
+ * Aliased Methods named_scope search to ext_search and paginate to ext_paginate to avoid conflicts.
7
+ * Updated the Readme
8
+ * Removed an unusued back_to helper
9
+ * Fixed a bug with simple_error_messages_for [joe1chen]
10
+ * Fixed a bug in generators on Windows [Paolo Angelini]
11
+
1
12
  2009-09-09
2
13
  * Bump to 5.0.8
3
14
  * Changed the rake lipsiadmin:update:javascripts now update also backend.js.erb and locale.js.erb
data/README.rdoc CHANGED
@@ -69,5 +69,5 @@ Please contribute in coding, patch, and submitting translation api documentation
69
69
 
70
70
  Official Site can be found here:: http://www.lipsiadmin.com
71
71
  Community can be found here:: http://groups.google.com/group/lipsiadmin
72
- Api documentation can be found here:: http://api.lipsiasoft.com
72
+ Api documentation can be found here:: http://api.lipsiadmin.com
73
73
  Follow us on twitter:: http://twitter.com/daddye
data/Rakefile CHANGED
@@ -27,13 +27,6 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
27
27
  rdoc.rdoc_files.include('lib/**/*.rb')
28
28
  end
29
29
 
30
- desc 'Clean up files.'
31
- task :clean do |t|
32
- FileUtils.rm_rf "doc"
33
- FileUtils.rm_rf "tmp"
34
- FileUtils.rm_rf "pkg"
35
- end
36
-
37
30
  spec = Gem::Specification.new do |s|
38
31
  s.name = PKG_NAME
39
32
  s.version = PKG_VERSION
@@ -50,6 +43,13 @@ spec = Gem::Specification.new do |s|
50
43
  s.add_dependency('rails', '>= 2.2.1')
51
44
  end
52
45
 
46
+ desc 'Clean up files.'
47
+ task :clean do |t|
48
+ FileUtils.rm_rf "doc"
49
+ FileUtils.rm_rf "tmp"
50
+ FileUtils.rm_rf "pkg"
51
+ end
52
+
53
53
  Rake::GemPackageTask.new(spec) do |p|
54
54
  p.gem_spec = spec
55
55
  p.need_tar = true
@@ -154,10 +154,12 @@ module Lipsiadmin
154
154
  # store_data(params, :include => :posts)
155
155
  #
156
156
  def store_data(params, options={})
157
+ # Some can tell me that this method made two identical queries one for count one for paginate.
158
+ # We don't use the select count because in some circumstances require much time than select *.
157
159
  @model.send(:with_scope, :find => options) do
158
- collection = @model.search(params)
160
+ collection = @model.ext_search(params)
159
161
  collection_count = collection.length
160
- collection_paginated = collection.paginate(params)
162
+ collection_paginated = collection.ext_paginate(params)
161
163
  { :results => store_data_from(collection_paginated), :count => collection_count }
162
164
  end
163
165
  end
@@ -8,14 +8,14 @@ module Lipsiadmin
8
8
  #
9
9
  # Examples:
10
10
  #
11
- # invoices = current_account.store.invoices.with(:order).search(params)
11
+ # invoices = current_account.store.invoices.with(:order).ext_search(params)
12
12
  # invoices_count = invoices.size
13
- # invoices_paginated = invoices.paginate(params)
13
+ # invoices_paginated = invoices.ext_paginate(params)
14
14
  #
15
15
  module UtilityScopes
16
16
  def self.included(base)#:nodoc:
17
17
  base.class_eval do
18
- named_scope :search, lambda { |params|
18
+ named_scope :ext_search, lambda { |params|
19
19
  order = params[:sort].blank? && params[:dir].blank? ? nil : "#{params[:sort]} #{params[:dir]}"
20
20
  conditions = nil
21
21
 
@@ -26,13 +26,21 @@ module Lipsiadmin
26
26
 
27
27
  { :conditions => conditions }
28
28
  }
29
-
30
- named_scope :paginate, lambda { |params|
29
+ named_scope :ext_paginate, lambda { |params|
31
30
  order = params[:sort].blank? && params[:dir].blank? ? nil : "#{params[:sort]} #{params[:dir]}"
32
31
  { :order => order, :limit => params[:limit], :offset => params[:start] }
33
32
  }
34
-
35
33
  named_scope :with, lambda { |*associations| { :include => associations } }
34
+
35
+ # You or your plugins (ex: will_paginate) now can override the search/paginate
36
+ # at the moment we can't remove them for backward compatibility.
37
+ (class << self; self end).instance_eval do
38
+ %w(search paginate).each do |name|
39
+ define_method name do |*args|
40
+ send("ext_#{name}", *args)
41
+ end
42
+ end
43
+ end
36
44
  end
37
45
  end
38
46
  end
data/lib/locale/de.yml ADDED
@@ -0,0 +1,16 @@
1
+ de:
2
+ lipsiadmin:
3
+ labels:
4
+ not_found: "Nicht gefunden"
5
+ buttons:
6
+ save: "Sichern"
7
+ exceptions:
8
+ "404":
9
+ title: "Die Seite, nach denen Du suchst, existiert nicht !"
10
+ description: "Du hast bestimmt die Adresse vertippt oder die Seite ist umgezogen!"
11
+ "422":
12
+ title: "Die �nderung, die Du willst, wurde abgelehnt !"
13
+ description: "Du versucht was zu �ndern, wo Du kein Zugriff hast!"
14
+ "500":
15
+ title: "Wir entschuldigen uns, aber etwas lief schief!"
16
+ description: "Wir wurden �ber dieses Thema informiert und wir werden innerhalb k�rzester Zeit hier nachschauen!"
data/lib/locale/en.yml CHANGED
@@ -5,12 +5,12 @@ en:
5
5
  buttons:
6
6
  save: "Save"
7
7
  exceptions:
8
- 404:
8
+ "404":
9
9
  title: "The page you were looking for doesn't exist"
10
10
  description: "You may have mistyped the address or the page may have moved."
11
- 422:
11
+ "422":
12
12
  title: "The change you wanted was rejected"
13
13
  description: "Maybe you tried to change something you didn't have access to."
14
- 500:
14
+ "500":
15
15
  title: "We're sorry, but something went wrong"
16
16
  description: "We've been notified about this issue and we'll take a look at it shortly"
data/lib/version.rb CHANGED
@@ -2,7 +2,7 @@ module Lipsiadmin
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 5
4
4
  MINOR = 0
5
- TINY = 8
5
+ TINY = 9
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -27,14 +27,14 @@ module Lipsiadmin
27
27
 
28
28
  I18n.with_options :locale => options[:locale], :scope => [:activerecord, :errors, :template] do |locale|
29
29
  header_message = if options.include?(:header_message)
30
- options[:header_message]
30
+ escape_javascript(options[:header_message])
31
31
  else
32
32
  object_name = options[:object_name].to_s.gsub('_', ' ')
33
33
  object_name = I18n.t(object_name, :default => object_name, :scope => [:activerecord, :models], :count => 1)
34
- locale.t :header, :count => count, :model => object_name
34
+ escape_javascript(locale.t :header, :count => count, :model => object_name)
35
35
  end
36
- message = options.include?(:message) ? options[:message] : locale.t(:body)
37
- error_messages = objects.sum {|object| object.errors.full_messages.map {|msg| content_tag(:li, ERB::Util.html_escape(msg)) } }.join
36
+ message = escape_javascript(options.include?(:message) ? options[:message] : locale.t(:body))
37
+ error_messages = objects.sum {|object| object.errors.full_messages.map {|msg| content_tag(:li, escape_javascript(msg)) } }.join
38
38
 
39
39
  contents = ''
40
40
  contents << content_tag(:p, message) unless message.blank?
@@ -179,11 +179,6 @@ module Lipsiadmin
179
179
  I18n.t("activerecord.attributes.#{instance}.#{method}", :default => method.to_s.humanize)
180
180
  end
181
181
 
182
- # Store the location to come back from for example an extjs grid
183
- def back_to(location)
184
- content_tag(:script, "Backend.app.backTo(#{url_for(location)})", :type => Mime::JS)
185
- end
186
-
187
182
  # Generate the menu from the Lispiadmin::AccessControl
188
183
  def backend_menu
189
184
  config = AccountAccess.maps_for(current_account).collect(&:project_modules).flatten.uniq.collect(&:config)
@@ -14,8 +14,14 @@ module Lipsiadmin#:nodoc:
14
14
  #
15
15
  # Component.new("Ext.grid.GroupingView", { :forceFit => true });
16
16
  #
17
+ # If you want to override our default templates you can do easly with:
18
+ #
19
+ # Lipsiadmin::Ext::Component.template_paths.unshift("/path/to/my/js/templates")
20
+ #
17
21
  class Component
18
-
22
+ @@template_paths = ["#{File.dirname(__FILE__)}/templates", "#{Rails.root}/app/views/backend"]
23
+ cattr_accessor :template_paths
24
+
19
25
  def initialize(klass, options={}, &block)#:nodoc:
20
26
  @klass = klass
21
27
  @prefix = options.delete(:prefix)
@@ -191,7 +197,9 @@ module Lipsiadmin#:nodoc:
191
197
  private
192
198
  def render_javascript(template, assigns)
193
199
  assigns.each { |key, value| instance_variable_set("@#{key}", value) }
194
- template = File.read("#{File.dirname(__FILE__)}/templates/#{template}.js.erb")
200
+ path = template_paths.find { |f| File.exist?(File.join(f, "#{template}.js.erb")) }
201
+ raise_error "Sorry but we didn't found the template #{template}.js.erb in your template_paths" unless path
202
+ template = File.read(File.join(path, "#{template}.js.erb"))
195
203
  return ERB.new(template).result(binding)
196
204
  end
197
205
 
@@ -59,6 +59,7 @@ module Lipsiadmin
59
59
  viewConfig :forceFit => true
60
60
  border false
61
61
  bodyBorder false
62
+ template :default
62
63
  clicksToEdit 1
63
64
  region "center"
64
65
  sm :checkbox
@@ -203,8 +204,29 @@ module Lipsiadmin
203
204
  add_object(:cm, cm)
204
205
  end
205
206
 
207
+ # Define the template to use for build grid functions (add/delete/edit)
208
+ #
209
+ # Default we use:
210
+ #
211
+ # /path/to/lipsiadmin/lib/view/helpers/ext/templates/grid_functions.js.erb
212
+ #
213
+ # But you can easy add your own paths like:
214
+ #
215
+ # Lipsiadmin::Ext::Component.template_paths.unshift("/path/to/my/js/templates")
216
+ #
217
+ # Or direct by grid:
218
+ #
219
+ # # products/show.rjs
220
+ # page.grid :editable => true do |grid|
221
+ # grid.id "grid-products"
222
+ # grid.template "products/grid_functions"
223
+ # ...
224
+ #
225
+ def template(value)
226
+ @template = value == :default ? :grid_functions : value
227
+ end
206
228
 
207
- # Define if the grid need to be added to
229
+ # Define if the grid need to be added to contentDynamic
208
230
  #
209
231
  # Backend.app.addItem(#{get_var});
210
232
  #
@@ -275,7 +297,7 @@ module Lipsiadmin
275
297
  raise_error "You must provide the store." if config[:store].blank?
276
298
  end
277
299
 
278
- after << render_javascript(:grid_functions, :var => get_var, :store => config[:store], :sm => config[:sm], :tbar => config[:tbar], :editable => @editable, :un => @un)
300
+ after << render_javascript(@template, :var => get_var, :store => config[:store], :sm => config[:sm], :tbar => config[:tbar], :editable => @editable, :un => @un)
279
301
 
280
302
  if @render
281
303
  after << "Backend.app.addItem(#{get_var});" if @render
@@ -25,7 +25,7 @@ end
25
25
 
26
26
  m.append("config/routes.rb", routes, "ActionController::Routing::Routes.draw do |map|")
27
27
  m.append("public/robots.txt", "User-agent: *\nDisallow: /backend")
28
- m.append("RakeFile", lipsiadmin_task)
28
+ m.append("Rakefile", lipsiadmin_task)
29
29
 
30
30
  m.create_all("controllers", "app/controllers")
31
31
  m.create_all("helpers", "app/helpers")
@@ -0,0 +1,225 @@
1
+ # If you translate this into other language or have something to fix please send me an email at: d.dagostino@lipsiasoft.com
2
+ de:
3
+ backend:
4
+ tabs:
5
+ general: "General"
6
+ titles:
7
+ welcome: "Willkommen"
8
+ general:
9
+ list: "Liste {{model}}"
10
+ editForm: "�ndern {{model}} {{value}}"
11
+ newForm: "Neu {{model}}"
12
+ cantDelete: "Du kannst diesen Satz nicht l�schen!"
13
+ page: "Seite"
14
+ of: "von"
15
+ sessions:
16
+ wrong: "Ung�ltige E-Mail oder Passwort"
17
+ logout: "Korrekt abgemeldet!"
18
+ menus:
19
+ account: "Benutzerkonto"
20
+ list: "Liste"
21
+ new: "Neu"
22
+ help: "Hilfe"
23
+ labels:
24
+ none: "Nichts"
25
+ add: "Hinzuf�gen"
26
+ remove: "Entfernen"
27
+ upload_file: "Hochladen Datei"
28
+ upload_files: "Hochladen Datei"
29
+ upload_image: "Hochladen Image"
30
+ upload_images: "Hochladen Images"
31
+ texts:
32
+ order_updated: Auftrag aktualisiert!
33
+ javascripts:
34
+ buttons:
35
+ add: "Hinzuf�gen"
36
+ edit: "�ndern"
37
+ remove: "L�schen"
38
+ back: "Zur�ck"
39
+ save: "Sichern"
40
+ close: "Schliessen"
41
+ select: "Selektieren"
42
+ help: "Hilfe"
43
+ send: "Senden"
44
+ help:
45
+ title: "Support Anfrage"
46
+ description: "Sag uns, welches Problem Du hast und wie wir es reproduzieren k�nnen"
47
+ compliments: "Ihre Anfrage wurde korrekt geliefert."
48
+ labels:
49
+ all: "Alle "
50
+ search: "Suchen "
51
+ messages:
52
+ compliments:
53
+ title: "Gratulation"
54
+ message: "Ihre Daten wurden korrekt gesichert!"
55
+ wait:
56
+ title: "Senden Daten"
57
+ message: "Senden Daten zu dem Server..."
58
+ confirm:
59
+ title: "Sind Sie sicher?"
60
+ message: "Sind sie sicher {0} Elemente zu l�schen?"
61
+ alert:
62
+ title: "Achtung"
63
+ message: "Es gibt einige Verbindungs-Probleme.<br />Kontaktiere technische Unterst�tzung."
64
+ notConfigured: "Diese Funktion ist noch nicht feriggestellt.<br />Kontaktiere technische Unterst�tzung."
65
+ notSelected: "Du mu�t mindestens ein Satz selektieren"
66
+
67
+ emails:
68
+ registration:
69
+ object: "Ihr Benutzerkonto wurde aktiviert"
70
+ body: "Hallo {{name}},\nIhr Benutzerkonto wurde aktiviert.\n\nDu kanst Dich mit dem folgenden Email-Kennung und Passwort anmelden:\n\n- Email: {{email}}\n- Passwort: {{password}}\n\nbenutze folgende URL: {{url}}"
71
+ support:
72
+ object: "Support Anfrage"
73
+ footer: "\n---------------------------\nViele Gr��e,\nLipsiaSoft s.r.l."
74
+
75
+ print:
76
+ footer:
77
+ page: "Seite"
78
+ page_of: "von"
79
+
80
+ extjs:
81
+ dateFormat: "d.m.Y"
82
+ dateTimeFormat: "d.m.Y G:i"
83
+ ddText: "{0} selektierten Datensatz/-s�tze"
84
+ closeText: "Schliesse diesen Tab"
85
+ invalidText: "Der Wert in diesem Feld ist ung�ltig"
86
+ msg: "Lade..."
87
+ emptyText: ""
88
+ splitRegion:
89
+ splitTip: "Ziehen um Gr��e zu ver�ndern."
90
+ collapsibleSplitTip: "Ziehen um Gr��e zu ver�ndern. Doppelklick zum verstecken."
91
+ messageBox:
92
+ ok: "OK"
93
+ yesse: "Ja"
94
+ cancel: "Abbruch"
95
+ none: "Nein"
96
+ datePicker:
97
+ todayText: "Heute"
98
+ minText: "Dieses Datum ist vor dem Minimum-Datum"
99
+ maxText: "Dieses Datum ist nach dem Maximum-Datum"
100
+ disabledDaysText: ""
101
+ disabledDatesText: ""
102
+ nextText: 'N�chsten Monat (Control+Rechts)'
103
+ prevText: 'Vorherigen Monat(Control+Links)'
104
+ monthYearText: 'W�hle ein Monat (Control+Auf/Runter um Jahre zu �ndern)'
105
+ todayTip: "{0} (Leertaste)"
106
+ format: "d.m.y"
107
+ cancelText: "Abbruch"
108
+ okText: "&#160;OK&#160;"
109
+ startDay: 0
110
+ grid:
111
+ gridView:
112
+ sortAscText: "Sortiere aufsteigend"
113
+ sortDescText: "Sortiere absteigend"
114
+ lockText: "Sperren Spalte"
115
+ unlockText: "Spaltesperre aufheben"
116
+ columnsText: "Spalte"
117
+ groupingView:
118
+ emptyGroupText: '(Nichts)'
119
+ groupByText: 'Gruppiere mit diesem Feld'
120
+ showGroupsText: 'Anzeige in Gruppen'
121
+ propertyColumnModel:
122
+ nameText: "Name"
123
+ valueText: "Wert"
124
+ dateFormat: "m/j/Y"
125
+ search:
126
+ searchText: "Suche"
127
+ searchTipText: "F�ge ein Wort ein oder dr�cke Suchen"
128
+ selectAllText: "Selektiere alle"
129
+ minCharsTipText: "F�ge mindestens {0} Zeichen ein"
130
+ pagingToolbar:
131
+ beforePageText: "Seite"
132
+ afterPageText: "von {0}"
133
+ firstText: "Erste Seite"
134
+ prevText: "Vorherige Seite"
135
+ nextText: "N�chste Seite"
136
+ lastText: "Letzte Seite"
137
+ refreshText: "Auffrischen"
138
+ displayMsg: "Anzeige {0} - {1} von {2}"
139
+ emptyMsg: 'Keine Daten zum Anzeigen'
140
+ form:
141
+ textField:
142
+ minLengthText: "Die minimale Eingabel�nge f�r dieses Feld ist {0}"
143
+ maxLengthText: "Die maximale Eingabel�nge f�r dieses Feld ist {0}"
144
+ blankText: "Dieses Feld wird ben�tigt"
145
+ regexText: ""
146
+ emptyText: ""
147
+ numberField:
148
+ minText: "Der minimale Wert f�r dieses Feld ist {0}"
149
+ maxText: "Der maximale Wert f�r dieses Feld ist {0}"
150
+ nanText: "{0} ist nicht eine g�ltige Zahl"
151
+ dateField:
152
+ disabledDaysText: "Nicht verf�gbar"
153
+ disabledDatesText: "Nicht verf�gbar"
154
+ minText: "Das Datum in diesem Feld muss nach dem {0} sein"
155
+ maxText: "Das Datum in diesem Feld muss vor dem {0} sein"
156
+ invalidText: "{0} ist kein g�ltiges Datum - es muss in dem Format sein: {1}"
157
+ format: "d.m.y"
158
+ altFormats: "d.m.Y|m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"
159
+ comboBox:
160
+ loadingText: "Lade..."
161
+ valueNotFoundText: ""
162
+ vTypes:
163
+ emailText: 'Dieses Feld soll eine E-Mail Adresse in dem Format "user@domain.com" sein'
164
+ urlText: 'Dieses Feld soll eine URL in dem Format "http://www.domain.com" sein'
165
+ alphaText: 'Dieses Feld soll nur Buchstaben und _ enthalten'
166
+ alphanumText: 'Dieses Feld soll nur Buchstaben, Nummern und _ enthalten'
167
+ htmlEditor:
168
+ createLinkText: 'Bitte gebe die URL f�r den Link ein:'
169
+ buttonTips:
170
+ bold:
171
+ title: 'Fett (Ctrl+B)'
172
+ text: 'Stelle den selektierten Text fett dar.'
173
+ cls: 'x-html-editor-tip'
174
+ italic:
175
+ title: 'Italic (Ctrl+I)'
176
+ text: 'Stelle den selektierten Text italic dar.'
177
+ cls: 'x-html-editor-tip'
178
+ underline:
179
+ title: 'Untertrichen (Ctrl+U)'
180
+ text: 'Unterstreicht den selektierten Text.'
181
+ cls: 'x-html-editor-tip'
182
+ increasefontsize:
183
+ title: 'Vergr��ern Text'
184
+ text: 'Vergr��ert die Schriftgr��e.'
185
+ cls: 'x-html-editor-tip'
186
+ decreasefontsize:
187
+ title: 'Verkleinern Text'
188
+ text: 'Verkleinert die Schriftgr��e.'
189
+ cls: 'x-html-editor-tip'
190
+ backcolor:
191
+ title: 'Text Hintergrund Farbe'
192
+ text: '�ndert Hintergrundfarbe des selektierten Textes'
193
+ cls: 'x-html-editor-tip'
194
+ forecolor:
195
+ title: 'Text Schrift Farbe'
196
+ text: '�ndert die Farbe des selektierten Textes'
197
+ cls: 'x-html-editor-tip'
198
+ justifyleft:
199
+ title: 'Text linksb�ndig anordnen'
200
+ text: 'Stelle text linksb�ndig dar'
201
+ cls: 'x-html-editor-tip'
202
+ justifycenter:
203
+ title: 'Zentriere Text'
204
+ text: 'Zentriert den Text in dem Editor.'
205
+ cls: 'x-html-editor-tip'
206
+ justifyright:
207
+ title: 'Text rechtsb�ndig anordnen'
208
+ text: 'Stelle text rechtsb�ndig dar.'
209
+ cls: 'x-html-editor-tip'
210
+ insertunorderedlist:
211
+ title: 'Gliederungs-Liste'
212
+ text: 'Beginnt eine Gliederungsliste.'
213
+ cls: 'x-html-editor-tip'
214
+ insertorderedlist:
215
+ title: 'Nummerierte Liste'
216
+ text: 'Beginnt eine nummerierte Liste.'
217
+ cls: 'x-html-editor-tip'
218
+ createlink:
219
+ title: 'Hyperlink'
220
+ text: 'Stelle selektierten Text als Hyperlink dar.'
221
+ cls: 'x-html-editor-tip'
222
+ sourceedit:
223
+ title: 'Quelle Editieren'
224
+ text: 'Wechsel zur Quelle im Editierungs-Modus.'
225
+ cls: 'x-html-editor-tip'
@@ -0,0 +1,15 @@
1
+ # Diese Datei wird ben�tigt Modelle/Tabelle und ihre Attribute/Spalten zu �bersetzen
2
+ de:
3
+ activerecord:
4
+ # �bersetze Model namen. Benutzt in Model.human_name()
5
+ #models:
6
+ # Zum Beispiel:
7
+ # user: "Dude"
8
+ # wird das "User" Model �bersetzen in "Dude"
9
+
10
+ # �bersetzt Model Attribute Namen. Benutzt in Model.human_attribute_name(attribute).
11
+ #attributes:
12
+ # Zum Beispiel:
13
+ # user:
14
+ # login: "Handle"
15
+ # wird das "User Attribute "login" als "Handle" �bersezen
@@ -0,0 +1,173 @@
1
+ de:
2
+ date:
3
+ formats:
4
+ # Benutze die strftime Parameter f�r die Formatierung
5
+ # Wenn keine Formate angegeben wurde, wird "default" benutzt.
6
+ # Du kannst andere Formate hier bieten, wenn Du willst.
7
+ default: "&d.&m.%Y"
8
+ short: "%b %d"
9
+ long: "%B %d, %Y"
10
+
11
+ day_names: [Sontag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag]
12
+ abbr_day_names: [Son, Mon, Die, Mit, Don, Fre, Sam]
13
+
14
+ # Vergesse nicht "nil" am Anfang, da gibt es nichts als ein 0-ten Monat
15
+ month_names: [~, Januar, Februar, Marz, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember]
16
+ abbr_month_names: [~, Jan, Feb, Mar, Apr, Mai, Jun, Jul, Aug, Sep, Okt, Nov, Dez]
17
+ # Benutzt in date_select and datime_select.
18
+ order: [ day, :month, :year ]
19
+
20
+ time:
21
+ formats:
22
+ default: "%a, %d %b %Y %H:%M:%S %z"
23
+ short: "%d %b %H:%M"
24
+ long: "%B %d, %Y %H:%M"
25
+ am: "am"
26
+ pm: "pm"
27
+
28
+ # Benutzt in array.to_sentence.
29
+ support:
30
+ select:
31
+ prompt: "Bitte selektiere "
32
+ array:
33
+ words_connector: ", "
34
+ two_words_connector: " und "
35
+ last_word_connector: ", und "
36
+
37
+ number:
38
+ # Benutzt in number_with_delimiter()
39
+ # Dies sind also die Standard-Einstellungen f�r W�hrung, Prozezentwerte, Genauigkeit und
40
+ # These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
41
+ format:
42
+ # Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
43
+ separator: ","
44
+ # Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three)
45
+ delimiter: "."
46
+ # Anzahl von Dezimalstellen hinter dem
47
+ # Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
48
+ precision: 2
49
+
50
+ # Benutzt in number_to_currency()
51
+ currency:
52
+ format:
53
+ # Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
54
+ format: "%n %u"
55
+ unit: "�"
56
+ # These three are to override number.format and are optional
57
+ separator: ","
58
+ delimiter: "."
59
+ precision: 2
60
+
61
+ # Benutzt in number_to_percentage()
62
+ percentage:
63
+ format:
64
+ # These three are to override number.format and are optional
65
+ # separator:
66
+ delimiter: ""
67
+ # precision:
68
+
69
+ # Benutzt in number_to_precision()
70
+ precision:
71
+ format:
72
+ # These three are to override number.format and are optional
73
+ # separator:
74
+ delimiter: ""
75
+ # precision:
76
+
77
+ # Benutzt in number_to_human_size()
78
+ human:
79
+ format:
80
+ # These three are to override number.format and are optional
81
+ # separator:
82
+ delimiter: ""
83
+ precision: 1
84
+
85
+ storage_units:
86
+ # Storage units output formatting.
87
+ # %u is the storage unit, %n is the number (default: 2 MB)
88
+ format: "%n %u"
89
+ units:
90
+ byte:
91
+ one: "Byte"
92
+ other: "Bytes"
93
+ kb: "KB"
94
+ mb: "MB"
95
+ gb: "GB"
96
+ tb: "TB"
97
+
98
+ # Benutzt in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
99
+ datetime:
100
+ distance_in_words:
101
+ half_a_minute: "eine halbe Minute"
102
+ less_than_x_seconds:
103
+ one: "weniger als 1 Sekunde"
104
+ other: "weniger als {{count}} Sekunden"
105
+ x_seconds:
106
+ one: "1 Sekunde"
107
+ other: "{{count}} Sekunden"
108
+ less_than_x_minutes:
109
+ one: "weniger als eine Minute"
110
+ other: "weniger als {{count}} Minuten"
111
+ x_minutes:
112
+ one: "1 Minute"
113
+ other: "{{count}} Minuten"
114
+ about_x_hours:
115
+ one: "�ber 1 Stunde"
116
+ other: "�ber {{count}} Stunden"
117
+ x_days:
118
+ one: "1 Tag"
119
+ other: "{{count}} Tage"
120
+ about_x_months:
121
+ one: "�ber 1 Monat"
122
+ other: "�ber {{count}} Monate"
123
+ x_months:
124
+ one: "1 Monat"
125
+ other: "{{count}} Monate"
126
+ about_x_years:
127
+ one: "�ber 1 Jahr"
128
+ other: "�ber {{count}} Jahre"
129
+ over_x_years:
130
+ one: "vor 1 Jahr"
131
+ other: "vor {{count}} Jahre"
132
+ prompts:
133
+ year: "Jahr"
134
+ month: "Monat"
135
+ day: "Tag"
136
+ hour: "Stunde"
137
+ minute: "Minute"
138
+ second: "Sekunde"
139
+
140
+ activerecord:
141
+ errors:
142
+ template:
143
+ header:
144
+ one: "1 Fehler verhindert, dass Objekt {{model}} gesichert werden kann"
145
+ other: "{{count}} Fehler verhindern, dass Objekt {{model}} gesichert werden kann"
146
+ # Die Variable :count ist auch verf�gbar
147
+ body: "Es existieren Probleme mit den follgenden Feldern:"
148
+ # The values :model, :attribute and :value are always available for interpolation
149
+ # The value :count is available when applicable. Can be used for pluralization.
150
+ messages:
151
+ inclusion: "ist nicht in der Liste enthalten"
152
+ exclusion: "ist reserviert"
153
+ invalid: "ist ung�ltig"
154
+ confirmation: "entspricht nicht der Best�tigung"
155
+ accepted: "muss akzeptiert werden"
156
+ empty: "Darf nicht leer sein"
157
+ blank: "Darf nicht nur Leerzeichen sein"
158
+ too_long: "ist zu lang (Maximum ist {{count}} Zeichen)"
159
+ too_short: "ist zu kurz (Minimum ist {{count}} Zeichen)"
160
+ wrong_length: "ist ung�ltiger L�nge (soll {{count}} Zeichen sein)"
161
+ taken: "has already been taken"
162
+ not_a_number: "ist nicht eine Nummer"
163
+ greater_than: "muss gr��er sein als {{count}}"
164
+ greater_than_or_equal_to: "muss gr��er gleich sein als {{count}}"
165
+ equal_to: "muss gleich sein als {{count}}"
166
+ less_than: "muss weniger sein als {{count}}"
167
+ less_than_or_equal_to: "muss weniger oder gleich sein als {{count}}"
168
+ odd: "muss ungerade sein"
169
+ even: "muss gerade sein"
170
+ record_invalid: "Validierung schlug fehl: {{errors}}"
171
+ content_type: "Datei-Format wird nicht unterst�tzt"
172
+ # F�ge deine eigenen Fehler hier an oder in dem Modell/attributes Scope.
173
+
@@ -0,0 +1,6 @@
1
+ # Diese Datei wird f�r �bersetzungen des Frontends (UI-Screens) ben�tigt
2
+ # Wir erinnern Dich daran, dass im Backend eine einfache Methode in Style "Kauderwelsch" f�r die �bersetzung eingef�hrt wurde
3
+ # So kannst Du schreiben "�bersetze mich in Deutsch"[] wird sein I18n.t("translate_me_in_german", :default => "�bersetze mich in Deutsch")
4
+
5
+ de:
6
+ translate_me_in_german: �bersetze mich in Deutsch
@@ -680,7 +680,6 @@ Ext.extend(Ext.grid.Search, Ext.util.Observable, {
680
680
  * @cfg {String} searchText Text to display on menu button
681
681
  */
682
682
  ,searchText:'Search'
683
-
684
683
  /**
685
684
  * @cfg {String} searchTipText Text to display as input tooltip. Set to '' for no tooltip
686
685
  */
@@ -801,18 +800,19 @@ Ext.extend(Ext.grid.Search, Ext.util.Observable, {
801
800
  */
802
801
  ,init:function(grid) {
803
802
  this.grid = grid;
804
-
803
+ this.id = this.grid.id+'-search';
804
+
805
805
  // setup toolbar container if id was given
806
806
  if('string' === typeof this.toolbarContainer) {
807
807
  this.toolbarContainer = Ext.getCmp(this.toolbarContainer);
808
808
  }
809
809
 
810
810
  // do our processing after grid render and reconfigure
811
- grid.onRender = grid.onRender.createSequence(this.onRender, this);
811
+ grid.store.load = grid.store.load.createInterceptor(this.load, this);
812
+ grid.onRender = grid.onRender.createSequence(this.onRender, this);
812
813
  grid.reconfigure = grid.reconfigure.createSequence(this.reconfigure, this);
813
814
  } // eo function init
814
- // }}}
815
- // {{{
815
+
816
816
  /**
817
817
  * private add plugin controls to <b>existing</b> toolbar and calls reconfigure
818
818
  */
@@ -873,9 +873,9 @@ Ext.extend(Ext.grid.Search, Ext.util.Observable, {
873
873
  }, this, {single:true});
874
874
 
875
875
  tb.add(this.field);
876
-
877
- // reconfigure
878
- this.reconfigure();
876
+
877
+ // Init our State/Configuration
878
+ this.initState();
879
879
 
880
880
  // keyMap
881
881
  if(this.shortcutKey && this.shortcutModifier) {
@@ -898,6 +898,43 @@ Ext.extend(Ext.grid.Search, Ext.util.Observable, {
898
898
  } // eo function onRender
899
899
  // }}}
900
900
  // {{{
901
+
902
+ // private
903
+ ,initState:function(){
904
+ if(Ext.state.Manager){
905
+ var state = Ext.state.Manager.get(this.id);
906
+ this.applyState(state)
907
+ }
908
+ }
909
+ ,applyState:function(state){
910
+ if(state){
911
+ if(state.checked && state.checked instanceof Array) { this.checkIndexes=state.checked };
912
+ if(state.value) { this.field.setValue(state.value) };
913
+ }
914
+ this.reconfigure();
915
+ this.onTriggerSearch();
916
+ }
917
+ ,saveState:function(){
918
+ if(Ext.state.Manager){
919
+ var state = this.getState();
920
+ Ext.state.Manager.set(this.id, state);
921
+ }
922
+ }
923
+ ,getState:function(){
924
+ var checked = [];
925
+ this.menu.items.each(function(item) {
926
+ if (item.dataIndex && item.checked) { checked.push(item.dataIndex) }
927
+ });
928
+ this.inited = true;
929
+ return { value: this.field.getValue(), checked: checked }
930
+ }
931
+ /**
932
+ * Prevent our grid from double datastore loading
933
+ * @private
934
+ */
935
+ ,load:function(){
936
+ return (this.field != undefined && this.inited == true)
937
+ }
901
938
  /**
902
939
  * field el keypup event handler. Triggers the search
903
940
  * @private
@@ -919,6 +956,7 @@ Ext.extend(Ext.grid.Search, Ext.util.Observable, {
919
956
  this.field.focus();
920
957
  this.onTriggerSearch();
921
958
  }
959
+ this.saveState();
922
960
  } // eo function onTriggerClear
923
961
  // }}}
924
962
  // {{{
@@ -985,7 +1023,7 @@ Ext.extend(Ext.grid.Search, Ext.util.Observable, {
985
1023
  // reload store
986
1024
  store.reload();
987
1025
  }
988
-
1026
+ this.saveState();
989
1027
  } // eo function onTriggerSearch
990
1028
  // }}}
991
1029
  // {{{
@@ -1017,7 +1055,6 @@ Ext.extend(Ext.grid.Search, Ext.util.Observable, {
1017
1055
  * private (re)configures the plugin, creates menu items from column model
1018
1056
  */
1019
1057
  ,reconfigure:function() {
1020
-
1021
1058
  // {{{
1022
1059
  // remove old items
1023
1060
  var menu = this.menu;
@@ -1099,7 +1136,6 @@ Ext.extend(Ext.grid.Search, Ext.util.Observable, {
1099
1136
  }); // eo extend
1100
1137
 
1101
1138
  // eof
1102
-
1103
1139
  /**
1104
1140
  * This class store state session of extjs in the database for the current account
1105
1141
  */
@@ -1,2 +1,3 @@
1
- Ext.util.Format.eurMoney=function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);return v+" €"};Ext.util.Format.boolRenderer=function(v,p,record){p.css+=" x-grid3-check-col-td";return'<div class="x-grid3-check-col'+(v?"-on":"")+" x-grid3-cc-"+this.id+'">&#160;</div>'};var treeDropConfig={getDropPoint:function(e,n,dd){var tn=n.node;if(tn.isRoot){return tn.allowChildren!==false?"append":false}var dragEl=n.ddel;var t=Ext.lib.Dom.getY(dragEl),b=t+dragEl.offsetHeight;var y=Ext.lib.Event.getPageY(e);var noAppend=tn.allowChildren===false;if(this.appendOnly||tn.parentNode.allowChildren===false){return noAppend?false:"append"}var noBelow=false;if(!this.allowParentInsert){noBelow=tn.hasChildNodes()&&tn.isExpanded()}var q=(b-t)/(noAppend?2:3);if(y>=t&&y<(t+q)){return"above"}else{if(!noBelow&&(noAppend||y>=b-q&&y<=b)){return"below"}else{return"append"}}},completeDrop:function(de){var ns=de.dropNode,p=de.point,t=de.target;if(!Ext.isArray(ns)){ns=[ns]}var n;for(var i=0,len=ns.length;i<len;i++){n=ns[i];if(p=="above"){t.parentNode.insertBefore(n,t)}else{if(p=="below"){t.parentNode.insertBefore(n,t.nextSibling)}else{t.leaf=false;t.appendChild(n)}}}n.ui.focus();if(this.tree.hlDrop){n.ui.highlight()}t.ui.endDrop();this.tree.fireEvent("nodedrop",de)}};Ext.grid.CheckColumn=function(config){Ext.apply(this,config);if(!this.id){this.id=Ext.id()}this.renderer=this.renderer.createDelegate(this)};Ext.grid.CheckColumn.prototype={init:function(grid){this.grid=grid;this.grid.on("render",function(){var view=this.grid.getView();view.mainBody.on("mousedown",this.onMouseDown,this)},this)},onMouseDown:function(e,t){if(t.className&&t.className.indexOf("x-grid3-cc-"+this.id)!=-1){e.stopEvent();var index=this.grid.getView().findRowIndex(t);var record=this.grid.store.getAt(index);var editEvent={grid:this.grid,record:this.grid.store.getAt(index),field:this.dataIndex,value:!record.data[this.dataIndex],originalValue:record.data[this.dataIndex],row:index,column:this.grid.getColumnModel().findColumnIndex(this.dataIndex)};record.set(this.dataIndex,editEvent.value);this.grid.getSelectionModel().selectRow(index);this.grid.fireEvent("afteredit",editEvent)}},renderer:function(v,p,record){p.css+=" x-grid3-check-col-td";return'<div class="x-grid3-check-col'+(v?"-on":"")+" x-grid3-cc-"+this.id+'">&#160;</div>'}};Ext.form.DateTimeField=Ext.extend(Ext.form.Field,{defaultAutoCreate:{tag:"input",type:"hidden"},timeWidth:100,dateWidth:100,dtSeparator:" ",hiddenFormat:"Y-m-d H:i:s",otherToNow:true,dateFormat:"d/m/y",timeFormat:"H:i",allowBlank:true,hideTime:false,initComponent:function(){Ext.form.DateTimeField.superclass.initComponent.call(this);var dateConfig=Ext.apply({},{id:this.id+"-date",format:this.dateFormat||Ext.form.DateField.prototype.format,width:this.dateWidth,allowBlank:this.allowBlank,selectOnFocus:this.selectOnFocus,listeners:{blur:{scope:this,fn:this.onBlur},focus:{scope:this,fn:this.onFocus}}},this.dateConfig);this.df=new Ext.form.DateField(dateConfig);this.df.ownerCt=this;delete (this.dateFormat);var timeConfig=Ext.apply({},{id:this.id+"-time",format:this.timeFormat||Ext.form.TimeField.prototype.format,allowBlank:(this.hideTime||this.allowBlank),width:this.timeWidth,selectOnFocus:this.selectOnFocus,listeners:{blur:{scope:this,fn:this.onBlur},focus:{scope:this,fn:this.onFocus}}},this.timeConfig);this.tf=new Ext.form.TimeField(timeConfig);this.tf.ownerCt=this;delete (this.timeFormat);this.relayEvents(this.df,["focus","specialkey","invalid","valid"]);this.relayEvents(this.tf,["focus","specialkey","invalid","valid"])},onRender:function(ct,position){if(this.isRendered){return}Ext.form.DateTimeField.superclass.onRender.call(this,ct,position);var t;var timeStyle=this.hideTime?"display:none":"";t=Ext.DomHelper.append(ct,{tag:"table",style:"border-collapse:collapse",children:[{tag:"tr",children:[{tag:"td",style:"padding-right:17px",cls:"datetime-date"},{tag:"td",cls:"datetime-time",style:timeStyle}]}]},true);this.tableEl=t;this.wrap=t.wrap();this.wrap.on("mousedown",this.onMouseDown,this,{delay:10});this.df.render(t.child("td.datetime-date"));this.tf.render(t.child("td.datetime-time"));this.df.wrap.setStyle({width:this.dateWidth});this.tf.wrap.setStyle({width:this.timeWidth});if(Ext.isIE&&Ext.isStrict){t.select("input").applyStyles({top:0})}this.on("specialkey",this.onSpecialKey,this);this.df.el.swallowEvent(["keydown","keypress"]);this.tf.el.swallowEvent(["keydown","keypress"]);if("side"===this.msgTarget){var elp=this.el.findParent(".x-form-element",10,true);this.errorIcon=elp.createChild({cls:"x-form-invalid-icon"});this.df.errorIcon=this.errorIcon;this.tf.errorIcon=this.errorIcon}if(!this.el.dom.name){this.el.dom.name=this.hiddenName||this.name||this.id}this.df.el.dom.removeAttribute("name");this.tf.el.dom.removeAttribute("name");this.isRendered=true;if(this.el.dom.value){this.setValue(this.el.dom.value)}else{this.setValue(new Date());this.updateHidden()}},adjustSize:Ext.BoxComponent.prototype.adjustSize,alignErrorIcon:function(){this.errorIcon.alignTo(this.tableEl,"tl-tr",[2,0])},initDateValue:function(){this.dateValue=this.otherToNow?new Date():new Date(1970,0,1,0,0,0)},clearInvalid:function(){this.df.clearInvalid();this.tf.clearInvalid()},beforeDestroy:function(){if(this.isRendered){this.wrap.removeAllListeners();this.wrap.remove();this.tableEl.remove();this.df.destroy();this.tf.destroy()}},disable:function(){if(this.isRendered){this.df.disabled=this.disabled;this.df.onDisable();this.tf.onDisable()}this.disabled=true;this.df.disabled=true;this.tf.disabled=true;this.fireEvent("disable",this);return this},enable:function(){if(this.rendered){this.df.onEnable();this.tf.onEnable()}this.disabled=false;this.df.disabled=false;this.tf.disabled=false;this.fireEvent("enable",this);return this},focus:function(){this.df.focus()},getPositionEl:function(){return this.wrap},getResizeEl:function(){return this.wrap},getValue:function(){return this.dateValue?new Date(this.dateValue):""},isValid:function(){return this.df.isValid()&&this.tf.isValid()},isVisible:function(){return this.df.rendered&&this.df.getActionEl().isVisible()},onBlur:function(f){if(this.wrapClick){f.focus();this.wrapClick=false}this.updateDate();this.updateTime();this.updateHidden();(function(){if(!this.df.hasFocus&&!this.tf.hasFocus){var v=this.getValue();if(String(v)!==String(this.startValue)){this.fireEvent("change",this,v,this.startValue)}this.hasFocus=false;this.fireEvent("blur",this)}}).defer(100,this)},onFocus:function(){if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},onMouseDown:function(e){if(!this.disabled){this.wrapClick="td"===e.target.nodeName.toLowerCase()}},onSpecialKey:function(t,e){var key=e.getKey();if(key===e.TAB){if(t===this.df&&!e.shiftKey){e.stopEvent();this.tf.focus()}if(t===this.tf&&e.shiftKey){e.stopEvent();this.df.focus()}}if(key===e.ENTER){this.updateValue()}},setDate:function(date){this.df.setValue(date)},setTime:function(date){this.tf.setValue(date)},setSize:function(w,h){if(!w){return}if("below"===this.timePosition){this.df.setSize(w,h);this.tf.setSize(w,h);if(Ext.isIE){this.df.el.up("td").setWidth(w);this.tf.el.up("td").setWidth(w)}}else{this.df.setSize(w-this.timeWidth-4,h);this.tf.setSize(this.timeWidth,h);if(Ext.isIE){this.df.el.up("td").setWidth(w-this.timeWidth-4);this.tf.el.up("td").setWidth(this.timeWidth)}}},setValue:function(val){if(!val&&true===this.emptyToNow){this.setValue(new Date());return}else{if(!val){this.setDate("");this.setTime("");this.updateValue();return}}if("number"===typeof val){val=new Date(val)}else{if("string"===typeof val&&this.hiddenFormat){val=Date.parseDate(val,this.hiddenFormat)}}val=val?val:new Date(1970,0,1,0,0,0);var da,time;if(val instanceof Date){this.setDate(val);this.setTime(val);this.dateValue=new Date(val)}else{da=val.split(this.dtSeparator);this.setDate(da[0]);if(da[1]){if(da[2]){da[1]+=da[2]}var hh=da[1].split(":");this.setTime(hh[0]+":"+hh[1])}}},setVisible:function(visible){if(visible){this.df.show();
2
- this.tf.show()}else{this.df.hide();this.tf.hide()}return this},show:function(){return this.setVisible(true)},hide:function(){return this.setVisible(false)},updateDate:function(){var d=this.df.getValue();if(d){if(!(this.dateValue instanceof Date)){this.initDateValue();if(!this.tf.getValue()){this.setTime(this.dateValue)}}this.dateValue.setMonth(0);this.dateValue.setFullYear(d.getFullYear());this.dateValue.setMonth(d.getMonth());this.dateValue.setDate(d.getDate())}else{this.dateValue="";this.setTime("")}},updateTime:function(){var t=this.tf.getValue();if(t&&!(t instanceof Date)){t=Date.parseDate(t,this.tf.format)}if(t&&!this.df.getValue()){this.initDateValue();this.setDate(this.dateValue)}if(this.dateValue instanceof Date){if(t){this.dateValue.setHours(t.getHours());this.dateValue.setMinutes(t.getMinutes());this.dateValue.setSeconds(t.getSeconds())}else{this.dateValue.setHours(0);this.dateValue.setMinutes(0);this.dateValue.setSeconds(0)}}},updateHidden:function(){if(this.isRendered){var value=this.dateValue instanceof Date?this.dateValue.format(this.hiddenFormat):"";this.el.dom.value=value}},updateValue:function(){this.updateDate();this.updateTime();this.updateHidden();return},validate:function(){return this.df.validate()&&this.tf.validate()},renderer:function(field){var format=field.editor.dateFormat||Ext.form.DateTime.prototype.dateFormat;format+=" "+(field.editor.timeFormat||Ext.form.DateTime.prototype.timeFormat);var renderer=function(val){var retval=Ext.util.Format.date(val,format);return retval};return renderer}});Ext.reg("datetimefield",Ext.form.DateTimeField);Ext.grid.Search=function(config){Ext.apply(this,config);Ext.grid.Search.superclass.constructor.call(this)};Ext.extend(Ext.grid.Search,Ext.util.Observable,{autoFocus:true,searchText:"Search",searchTipText:"Insert a word or press Search",selectAllText:"Select All",position:"top",iconCls:"check",checkIndexes:"all",disableIndexes:[],dateFormat:undefined,showSelectAll:true,menuStyle:"checkbox",minCharsTipText:"Insert at least {0} characters",mode:"remote",width:200,xtype:"gridsearch",paramNames:{fields:"fields",query:"query"},shortcutKey:"r",shortcutModifier:"alt",align:"right",minLength:3,init:function(grid){this.grid=grid;if("string"===typeof this.toolbarContainer){this.toolbarContainer=Ext.getCmp(this.toolbarContainer)}grid.onRender=grid.onRender.createSequence(this.onRender,this);grid.reconfigure=grid.reconfigure.createSequence(this.reconfigure,this)},onRender:function(){var panel=this.toolbarContainer||this.grid;var tb="bottom"===this.position?panel.bottomToolbar:panel.topToolbar;this.menu=new Ext.menu.Menu();if("right"===this.align){tb.addFill()}else{if(0<tb.items.getCount()){tb.addSeparator()}}tb.add({text:this.searchText,menu:this.menu});this.field=new Ext.form.TwinTriggerField({width:this.width,selectOnFocus:undefined===this.selectOnFocus?true:this.selectOnFocus,trigger1Class:"x-form-clear-trigger",trigger2Class:this.minChars?"x-hidden":"x-form-search-trigger",onTrigger1Click:this.minChars?Ext.emptyFn:this.onTriggerClear.createDelegate(this),onTrigger2Click:this.onTriggerSearch.createDelegate(this),minLength:this.minLength});this.field.on("render",function(){this.field.el.dom.qtip=this.minChars?String.format(this.minCharsTipText,this.minChars):this.searchTipText;if(this.minChars){this.field.el.on({scope:this,buffer:300,keyup:this.onKeyUp})}var map=new Ext.KeyMap(this.field.el,[{key:Ext.EventObject.ENTER,scope:this,fn:this.onTriggerSearch},{key:Ext.EventObject.ESC,scope:this,fn:this.onTriggerClear}]);map.stopEvent=true},this,{single:true});tb.add(this.field);this.reconfigure();if(this.shortcutKey&&this.shortcutModifier){var shortcutEl=this.grid.getEl();var shortcutCfg=[{key:this.shortcutKey,scope:this,stopEvent:true,fn:function(){this.field.focus()}}];shortcutCfg[0][this.shortcutModifier]=true;this.keymap=new Ext.KeyMap(shortcutEl,shortcutCfg)}if(true===this.autoFocus){this.grid.store.on({scope:this,load:function(){this.field.focus()}})}},onKeyUp:function(){var length=this.field.getValue().toString().length;if(0===length||this.minChars<=length){this.onTriggerSearch()}},onTriggerClear:function(){if(this.field.getValue()){this.field.setValue("");this.field.focus();this.onTriggerSearch()}},onTriggerSearch:function(){if(!this.field.isValid()){return}var val=this.field.getValue();var store=this.grid.store;if("local"===this.mode){store.clearFilter();if(val){store.filterBy(function(r){var retval=false;this.menu.items.each(function(item){if(!item.checked||retval){return}var rv=r.get(item.dataIndex);rv=rv instanceof Date?rv.format(this.dateFormat||r.fields.get(item.dataIndex).dateFormat):rv;var re=new RegExp(val,"gi");retval=re.test(rv)},this);if(retval){return true}return retval},this)}else{}}else{if(store.lastOptions&&store.lastOptions.params){store.lastOptions.params[store.paramNames.start]=0}var fields=[];this.menu.items.each(function(item){if(item.checked&&item.dataIndex){fields.push(item.dataIndex)}});delete (store.baseParams[this.paramNames.fields]);delete (store.baseParams[this.paramNames.query]);if(store.lastOptions&&store.lastOptions.params){delete (store.lastOptions.params[this.paramNames.fields]);delete (store.lastOptions.params[this.paramNames.query])}if(fields.length){store.baseParams[this.paramNames.fields]=fields.compact().join();store.baseParams[this.paramNames.query]=val}store.reload()}},setDisabled:function(){this.field.setDisabled.apply(this.field,arguments)},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},reconfigure:function(){var menu=this.menu;menu.removeAll();if(this.showSelectAll&&"radio"!==this.menuStyle){menu.add(new Ext.menu.CheckItem({text:this.selectAllText,checked:!(this.checkIndexes instanceof Array),hideOnClick:false,handler:function(item){var checked=!item.checked;item.parentMenu.items.each(function(i){if(item!==i&&i.setChecked&&!i.disabled){i.setChecked(checked)}})}}),"-")}var cm=this.grid.colModel;var group=undefined;if("radio"===this.menuStyle){group="g"+(new Date).getTime()}Ext.each(cm.config,function(config){var disable=false;if(config.header&&config.dataIndex&&config.sortable){Ext.each(this.disableIndexes,function(item){disable=disable?disable:item===config.dataIndex});if(!disable){menu.add(new Ext.menu.CheckItem({text:config.header,hideOnClick:false,group:group,checked:"all"===this.checkIndexes,dataIndex:config.dataIndex}))}}},this);if(this.checkIndexes instanceof Array){Ext.each(this.checkIndexes,function(di){var item=menu.items.find(function(itm){return itm.dataIndex===di});if(item){item.setChecked(true,true)}},this)}if(this.readonlyIndexes instanceof Array){Ext.each(this.readonlyIndexes,function(di){var item=menu.items.find(function(itm){return itm.dataIndex===di});if(item){item.disable()}},this)}}});Ext.state.DataBaseProvider=function(config){Ext.state.DataBaseProvider.superclass.constructor.call(this);this.path="/backend/state_sessions";Ext.apply(this,config);this.state=this.readCookies()};Ext.extend(Ext.state.DataBaseProvider,Ext.state.Provider,{set:function(name,value){if(typeof value=="undefined"||value===null){this.clear(name);return}this.setCookie(name,value);Ext.state.DataBaseProvider.superclass.set.call(this,name,value)},clear:function(name){this.clearCookie(name);Ext.state.DataBaseProvider.superclass.clear.call(this,name)},readCookies:function(){var cookies={};var values=[];new Ajax.Request(this.path,{method:"GET",asynchronous:false,onSuccess:function(response,request){values=Ext.decode(response.responseText)}});values.each(function(f){if(f.state_session&&f.state_session.component&&f.state_session.component.substring(0,3)=="ys-"){cookies[f.state_session.component.substr(3)]=this.decodeValue(f.state_session.data)}},this);return cookies},setCookie:function(name,value){Ext.Ajax.request({url:this.path,method:"POST",params:{id:"ys-"+name,data:this.encodeValue(value)}})},clearCookie:function(name){Ext.Ajax.request({url:this.path+"/ys-"+name,method:"DELETE"})}});
1
+ Ext.util.Format.eurMoney=function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);return v+" €"};Ext.util.Format.percentage=function(v,p,record){return(v+" %")};Ext.util.Format.boolRenderer=function(v,p,record){p.css+=" x-grid3-check-col-td";return'<div class="x-grid3-check-col'+(v?"-on":"")+" x-grid3-cc-"+this.id+'">&#160;</div>'};var treeDropConfig={getDropPoint:function(e,n,dd){var tn=n.node;if(tn.isRoot){return tn.allowChildren!==false?"append":false}var dragEl=n.ddel;var t=Ext.lib.Dom.getY(dragEl),b=t+dragEl.offsetHeight;var y=Ext.lib.Event.getPageY(e);var noAppend=tn.allowChildren===false;if(this.appendOnly||tn.parentNode.allowChildren===false){return noAppend?false:"append"}var noBelow=false;if(!this.allowParentInsert){noBelow=tn.hasChildNodes()&&tn.isExpanded()}var q=(b-t)/(noAppend?2:3);if(y>=t&&y<(t+q)){return"above"}else{if(!noBelow&&(noAppend||y>=b-q&&y<=b)){return"below"}else{return"append"}}},completeDrop:function(de){var ns=de.dropNode,p=de.point,t=de.target;if(!Ext.isArray(ns)){ns=[ns]}var n;for(var i=0,len=ns.length;i<len;i++){n=ns[i];if(p=="above"){t.parentNode.insertBefore(n,t)}else{if(p=="below"){t.parentNode.insertBefore(n,t.nextSibling)}else{t.leaf=false;t.appendChild(n)}}}n.ui.focus();if(this.tree.hlDrop){n.ui.highlight()}t.ui.endDrop();this.tree.fireEvent("nodedrop",de)}};Ext.grid.CheckColumn=function(config){Ext.apply(this,config);if(!this.id){this.id=Ext.id()}this.renderer=this.renderer.createDelegate(this)};Ext.grid.CheckColumn.prototype={init:function(grid){this.grid=grid;this.grid.on("render",function(){var view=this.grid.getView();view.mainBody.on("mousedown",this.onMouseDown,this)},this)},onMouseDown:function(e,t){if(t.className&&t.className.indexOf("x-grid3-cc-"+this.id)!=-1){e.stopEvent();var index=this.grid.getView().findRowIndex(t);var record=this.grid.store.getAt(index);var editEvent={grid:this.grid,record:this.grid.store.getAt(index),field:this.dataIndex,value:!record.data[this.dataIndex],originalValue:record.data[this.dataIndex],row:index,column:this.grid.getColumnModel().findColumnIndex(this.dataIndex)};record.set(this.dataIndex,editEvent.value);this.grid.getSelectionModel().selectRow(index);this.grid.fireEvent("afteredit",editEvent)}},renderer:function(v,p,record){p.css+=" x-grid3-check-col-td";return'<div class="x-grid3-check-col'+(v?"-on":"")+" x-grid3-cc-"+this.id+'">&#160;</div>'}};Ext.form.DateTimeField=Ext.extend(Ext.form.Field,{defaultAutoCreate:{tag:"input",type:"hidden"},timeWidth:100,dateWidth:100,dtSeparator:" ",hiddenFormat:"Y-m-d H:i:s",otherToNow:true,dateFormat:"d/m/y",timeFormat:"H:i",allowBlank:true,hideTime:false,initComponent:function(){Ext.form.DateTimeField.superclass.initComponent.call(this);var dateConfig=Ext.apply({},{id:this.id+"-date",format:this.dateFormat||Ext.form.DateField.prototype.format,width:this.dateWidth,allowBlank:this.allowBlank,selectOnFocus:this.selectOnFocus,listeners:{blur:{scope:this,fn:this.onBlur},focus:{scope:this,fn:this.onFocus}}},this.dateConfig);this.df=new Ext.form.DateField(dateConfig);this.df.ownerCt=this;delete (this.dateFormat);var timeConfig=Ext.apply({},{id:this.id+"-time",format:this.timeFormat||Ext.form.TimeField.prototype.format,allowBlank:(this.hideTime||this.allowBlank),width:this.timeWidth,selectOnFocus:this.selectOnFocus,listeners:{blur:{scope:this,fn:this.onBlur},focus:{scope:this,fn:this.onFocus}}},this.timeConfig);this.tf=new Ext.form.TimeField(timeConfig);this.tf.ownerCt=this;delete (this.timeFormat);this.relayEvents(this.df,["focus","specialkey","invalid","valid"]);this.relayEvents(this.tf,["focus","specialkey","invalid","valid"])},onRender:function(ct,position){if(this.isRendered){return}Ext.form.DateTimeField.superclass.onRender.call(this,ct,position);var t;var timeStyle=this.hideTime?"display:none":"";t=Ext.DomHelper.append(ct,{tag:"table",style:"border-collapse:collapse",children:[{tag:"tr",children:[{tag:"td",style:"padding-right:17px",cls:"datetime-date"},{tag:"td",cls:"datetime-time",style:timeStyle}]}]},true);this.tableEl=t;this.wrap=t.wrap();this.wrap.on("mousedown",this.onMouseDown,this,{delay:10});this.df.render(t.child("td.datetime-date"));this.tf.render(t.child("td.datetime-time"));this.df.wrap.setStyle({width:this.dateWidth});this.tf.wrap.setStyle({width:this.timeWidth});if(Ext.isIE&&Ext.isStrict){t.select("input").applyStyles({top:0})}this.on("specialkey",this.onSpecialKey,this);this.df.el.swallowEvent(["keydown","keypress"]);this.tf.el.swallowEvent(["keydown","keypress"]);if("side"===this.msgTarget){var elp=this.el.findParent(".x-form-element",10,true);this.errorIcon=elp.createChild({cls:"x-form-invalid-icon"});this.df.errorIcon=this.errorIcon;this.tf.errorIcon=this.errorIcon}if(!this.el.dom.name){this.el.dom.name=this.hiddenName||this.name||this.id}this.df.el.dom.removeAttribute("name");this.tf.el.dom.removeAttribute("name");this.isRendered=true;if(this.el.dom.value){this.setValue(this.el.dom.value)}else{if(true===this.emptyToNow){this.setValue(new Date());this.updateHidden()}}},adjustSize:Ext.BoxComponent.prototype.adjustSize,alignErrorIcon:function(){this.errorIcon.alignTo(this.tableEl,"tl-tr",[2,0])},initDateValue:function(){this.dateValue=this.otherToNow?new Date():""},clearInvalid:function(){this.df.clearInvalid();this.tf.clearInvalid()},beforeDestroy:function(){if(this.isRendered){this.wrap.removeAllListeners();this.wrap.remove();this.tableEl.remove();this.df.destroy();this.tf.destroy()}},disable:function(){if(this.isRendered){this.df.disabled=this.disabled;this.df.onDisable();this.tf.onDisable()}this.disabled=true;this.df.disabled=true;this.tf.disabled=true;this.fireEvent("disable",this);return this},enable:function(){if(this.rendered){this.df.onEnable();this.tf.onEnable()}this.disabled=false;this.df.disabled=false;this.tf.disabled=false;this.fireEvent("enable",this);return this},focus:function(){this.df.focus()},getPositionEl:function(){return this.wrap},getResizeEl:function(){return this.wrap},getValue:function(){return this.dateValue?new Date(this.dateValue):""},isValid:function(){return this.df.isValid()&&this.tf.isValid()},isVisible:function(){return this.df.rendered&&this.df.getActionEl().isVisible()},onBlur:function(f){if(this.wrapClick){f.focus();this.wrapClick=false}this.updateDate();this.updateTime();this.updateHidden();(function(){if(!this.df.hasFocus&&!this.tf.hasFocus){var v=this.getValue();if(String(v)!==String(this.startValue)){this.fireEvent("change",this,v,this.startValue)}this.hasFocus=false;this.fireEvent("blur",this)}}).defer(100,this)},onFocus:function(){if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},onMouseDown:function(e){if(!this.disabled){this.wrapClick="td"===e.target.nodeName.toLowerCase()}},onSpecialKey:function(t,e){var key=e.getKey();if(key===e.TAB){if(t===this.df&&!e.shiftKey){e.stopEvent();this.tf.focus()}if(t===this.tf&&e.shiftKey){e.stopEvent();this.df.focus()}}if(key===e.ENTER){this.updateValue()}},setDate:function(date){this.df.setValue(date)},setTime:function(date){this.tf.setRawValue(date)},setSize:function(w,h){if(!w){return}if("below"===this.timePosition){this.df.setSize(w,h);this.tf.setSize(w,h);if(Ext.isIE){this.df.el.up("td").setWidth(w);this.tf.el.up("td").setWidth(w)}}else{this.df.setSize(w-this.timeWidth-4,h);this.tf.setSize(this.timeWidth,h);if(Ext.isIE){this.df.el.up("td").setWidth(w-this.timeWidth-4);this.tf.el.up("td").setWidth(this.timeWidth)}}},setValue:function(val){if(!val&&true===this.emptyToNow){this.setValue(new Date());return}else{if(!val){this.setDate("");this.setTime("");this.updateValue();return}}if("number"===typeof val){val=new Date(val)}else{if("string"===typeof val&&this.hiddenFormat){val=Date.parseDate(val,this.hiddenFormat)}}val=val?val:new Date(1970,0,1,0,0,0);var da,time;if(val instanceof Date){this.setDate(val);this.setTime(val.format(this.timeFormat));this.dateValue=new Date(val)}else{da=val.split(this.dtSeparator);this.setDate(da[0]);if(da[1]){if(da[2]){da[1]+=da[2]
2
+ }var hh=da[1].split(":");this.setTime(hh[0]+":"+hh[1])}}},setVisible:function(visible){if(visible){this.df.show();this.tf.show()}else{this.df.hide();this.tf.hide()}return this},show:function(){return this.setVisible(true)},hide:function(){return this.setVisible(false)},updateDate:function(){var d=this.df.getValue();if(d){if(!(this.dateValue instanceof Date)){this.initDateValue();if(!this.tf.getValue()){this.setTime(this.dateValue)}}this.dateValue.setMonth(0);this.dateValue.setFullYear(d.getFullYear());this.dateValue.setMonth(d.getMonth());this.dateValue.setDate(d.getDate())}else{this.dateValue="";this.setTime("")}},updateTime:function(){var t=this.tf.getValue();if(t&&!(t instanceof Date)){t=Date.parseDate(t,this.tf.format)}if(t&&!this.df.getValue()){this.initDateValue();this.setDate(this.dateValue)}if(this.dateValue instanceof Date){if(t){this.dateValue.setHours(t.getHours());this.dateValue.setMinutes(t.getMinutes());this.dateValue.setSeconds(t.getSeconds())}else{this.dateValue.setHours(0);this.dateValue.setMinutes(0);this.dateValue.setSeconds(0)}}},updateHidden:function(){if(this.isRendered){var value=this.dateValue instanceof Date?this.dateValue.format(this.hiddenFormat):"";this.el.dom.value=value}},updateValue:function(){this.updateDate();this.updateTime();this.updateHidden();return},validate:function(){return this.df.validate()&&this.tf.validate()},renderer:function(field){var format=field.editor.dateFormat||Ext.form.DateTime.prototype.dateFormat;format+=" "+(field.editor.timeFormat||Ext.form.DateTime.prototype.timeFormat);var renderer=function(val){var retval=Ext.util.Format.date(val,format);return retval};return renderer}});Ext.reg("datetimefield",Ext.form.DateTimeField);Ext.grid.Search=function(config){Ext.apply(this,config);Ext.grid.Search.superclass.constructor.call(this)};Ext.extend(Ext.grid.Search,Ext.util.Observable,{autoFocus:true,searchText:"Search",searchTipText:"Insert a word or press Search",selectAllText:"Select All",position:"top",iconCls:"check",checkIndexes:"all",disableIndexes:[],dateFormat:undefined,showSelectAll:true,menuStyle:"checkbox",minCharsTipText:"Insert at least {0} characters",mode:"remote",width:200,xtype:"gridsearch",paramNames:{fields:"fields",query:"query"},shortcutKey:"r",shortcutModifier:"alt",align:"right",minLength:3,init:function(grid){this.grid=grid;this.id=this.grid.id+"-search";if("string"===typeof this.toolbarContainer){this.toolbarContainer=Ext.getCmp(this.toolbarContainer)}grid.store.load=grid.store.load.createInterceptor(this.load,this);grid.onRender=grid.onRender.createSequence(this.onRender,this);grid.reconfigure=grid.reconfigure.createSequence(this.reconfigure,this)},onRender:function(){var panel=this.toolbarContainer||this.grid;var tb="bottom"===this.position?panel.bottomToolbar:panel.topToolbar;this.menu=new Ext.menu.Menu();if("right"===this.align){tb.addFill()}else{if(0<tb.items.getCount()){tb.addSeparator()}}tb.add({text:this.searchText,menu:this.menu});this.field=new Ext.form.TwinTriggerField({width:this.width,selectOnFocus:undefined===this.selectOnFocus?true:this.selectOnFocus,trigger1Class:"x-form-clear-trigger",trigger2Class:this.minChars?"x-hidden":"x-form-search-trigger",onTrigger1Click:this.minChars?Ext.emptyFn:this.onTriggerClear.createDelegate(this),onTrigger2Click:this.onTriggerSearch.createDelegate(this),minLength:this.minLength});this.field.on("render",function(){this.field.el.dom.qtip=this.minChars?String.format(this.minCharsTipText,this.minChars):this.searchTipText;if(this.minChars){this.field.el.on({scope:this,buffer:300,keyup:this.onKeyUp})}var map=new Ext.KeyMap(this.field.el,[{key:Ext.EventObject.ENTER,scope:this,fn:this.onTriggerSearch},{key:Ext.EventObject.ESC,scope:this,fn:this.onTriggerClear}]);map.stopEvent=true},this,{single:true});tb.add(this.field);this.initState();if(this.shortcutKey&&this.shortcutModifier){var shortcutEl=this.grid.getEl();var shortcutCfg=[{key:this.shortcutKey,scope:this,stopEvent:true,fn:function(){this.field.focus()}}];shortcutCfg[0][this.shortcutModifier]=true;this.keymap=new Ext.KeyMap(shortcutEl,shortcutCfg)}if(true===this.autoFocus){this.grid.store.on({scope:this,load:function(){this.field.focus()}})}},initState:function(){if(Ext.state.Manager){var state=Ext.state.Manager.get(this.id);this.applyState(state)}},applyState:function(state){if(state){if(state.checked&&state.checked instanceof Array){this.checkIndexes=state.checked}if(state.value){this.field.setValue(state.value)}}this.reconfigure();this.onTriggerSearch()},saveState:function(){if(Ext.state.Manager){var state=this.getState();Ext.state.Manager.set(this.id,state)}},getState:function(){var checked=[];this.menu.items.each(function(item){if(item.dataIndex&&item.checked){checked.push(item.dataIndex)}});this.inited=true;return{value:this.field.getValue(),checked:checked}},load:function(){return(this.field!=undefined&&this.inited==true)},onKeyUp:function(){var length=this.field.getValue().toString().length;if(0===length||this.minChars<=length){this.onTriggerSearch()}},onTriggerClear:function(){if(this.field.getValue()){this.field.setValue("");this.field.focus();this.onTriggerSearch()}this.saveState()},onTriggerSearch:function(){if(!this.field.isValid()){return}var val=this.field.getValue();var store=this.grid.store;if("local"===this.mode){store.clearFilter();if(val){store.filterBy(function(r){var retval=false;this.menu.items.each(function(item){if(!item.checked||retval){return}var rv=r.get(item.dataIndex);rv=rv instanceof Date?rv.format(this.dateFormat||r.fields.get(item.dataIndex).dateFormat):rv;var re=new RegExp(val,"gi");retval=re.test(rv)},this);if(retval){return true}return retval},this)}else{}}else{if(store.lastOptions&&store.lastOptions.params){store.lastOptions.params[store.paramNames.start]=0}var fields=[];this.menu.items.each(function(item){if(item.checked&&item.dataIndex){fields.push(item.dataIndex)}});delete (store.baseParams[this.paramNames.fields]);delete (store.baseParams[this.paramNames.query]);if(store.lastOptions&&store.lastOptions.params){delete (store.lastOptions.params[this.paramNames.fields]);delete (store.lastOptions.params[this.paramNames.query])}if(fields.length){store.baseParams[this.paramNames.fields]=fields.compact().join();store.baseParams[this.paramNames.query]=val}store.reload()}this.saveState()},setDisabled:function(){this.field.setDisabled.apply(this.field,arguments)},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},reconfigure:function(){var menu=this.menu;menu.removeAll();if(this.showSelectAll&&"radio"!==this.menuStyle){menu.add(new Ext.menu.CheckItem({text:this.selectAllText,checked:!(this.checkIndexes instanceof Array),hideOnClick:false,handler:function(item){var checked=!item.checked;item.parentMenu.items.each(function(i){if(item!==i&&i.setChecked&&!i.disabled){i.setChecked(checked)}})}}),"-")}var cm=this.grid.colModel;var group=undefined;if("radio"===this.menuStyle){group="g"+(new Date).getTime()}Ext.each(cm.config,function(config){var disable=false;if(config.header&&config.dataIndex&&config.sortable){Ext.each(this.disableIndexes,function(item){disable=disable?disable:item===config.dataIndex});if(!disable){menu.add(new Ext.menu.CheckItem({text:config.header,hideOnClick:false,group:group,checked:"all"===this.checkIndexes,dataIndex:config.dataIndex}))}}},this);if(this.checkIndexes instanceof Array){Ext.each(this.checkIndexes,function(di){var item=menu.items.find(function(itm){return itm.dataIndex===di});if(item){item.setChecked(true,true)}},this)}if(this.readonlyIndexes instanceof Array){Ext.each(this.readonlyIndexes,function(di){var item=menu.items.find(function(itm){return itm.dataIndex===di});if(item){item.disable()}},this)}}});Ext.state.DataBaseProvider=function(config){Ext.state.DataBaseProvider.superclass.constructor.call(this);this.path="/backend/state_sessions";Ext.apply(this,config);this.state=this.readCookies()};Ext.extend(Ext.state.DataBaseProvider,Ext.state.Provider,{set:function(name,value){if(typeof value=="undefined"||value===null){this.clear(name);
3
+ return}this.setCookie(name,value);Ext.state.DataBaseProvider.superclass.set.call(this,name,value)},clear:function(name){this.clearCookie(name);Ext.state.DataBaseProvider.superclass.clear.call(this,name)},readCookies:function(){var cookies={};var values=[];new Ajax.Request(this.path,{method:"GET",asynchronous:false,onSuccess:function(response,request){values=Ext.decode(response.responseText)}});values.each(function(f){if(f.state_session&&f.state_session.component&&f.state_session.component.substring(0,3)=="ys-"){cookies[f.state_session.component.substr(3)]=this.decodeValue(f.state_session.data)}},this);return cookies},setCookie:function(name,value){Ext.Ajax.request({url:this.path,method:"POST",params:{id:"ys-"+name,data:this.encodeValue(value)}})},clearCookie:function(name){Ext.Ajax.request({url:this.path+"/ys-"+name,method:"DELETE"})}});
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lipsiadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.8
4
+ version: 5.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davide D'Agostino
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-10 00:00:00 +02:00
12
+ date: 2009-12-01 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -57,10 +57,13 @@ files:
57
57
  - lipsiadmin_generators/backend/templates/config/initializers/config.rb
58
58
  - lipsiadmin_generators/backend/templates/config/initializers/emails.rb
59
59
  - lipsiadmin_generators/backend/templates/config/initializers/exception_notifier.rb
60
+ - lipsiadmin_generators/backend/templates/config/locales/backend/de.yml
60
61
  - lipsiadmin_generators/backend/templates/config/locales/backend/en.yml
61
62
  - lipsiadmin_generators/backend/templates/config/locales/backend/it.yml
63
+ - lipsiadmin_generators/backend/templates/config/locales/models/account/de.yml
62
64
  - lipsiadmin_generators/backend/templates/config/locales/models/account/en.yml
63
65
  - lipsiadmin_generators/backend/templates/config/locales/models/account/it.yml
66
+ - lipsiadmin_generators/backend/templates/config/locales/rails/de.yml
64
67
  - lipsiadmin_generators/backend/templates/config/locales/rails/en.yml
65
68
  - lipsiadmin_generators/backend/templates/config/locales/rails/it.yml
66
69
  - lipsiadmin_generators/backend/templates/controllers/backend/accounts_controller.rb
@@ -360,6 +363,7 @@ files:
360
363
  - lipsiadmin_generators/backend_page/templates/view_new.html.haml
361
364
  - lipsiadmin_generators/frontend/frontend_generator.rb
362
365
  - lipsiadmin_generators/frontend/REMEMBER
366
+ - lipsiadmin_generators/frontend/templates/config/locales/frontend/de.yml
363
367
  - lipsiadmin_generators/frontend/templates/config/locales/frontend/en.yml
364
368
  - lipsiadmin_generators/frontend/templates/config/locales/frontend/it.yml
365
369
  - lipsiadmin_generators/frontend/templates/controllers/frontend/base_controller.rb
@@ -407,6 +411,7 @@ files:
407
411
  - lib/generator.rb
408
412
  - lib/lipsiadmin.rb
409
413
  - lib/lipsiadmin_tasks.rb
414
+ - lib/locale/de.yml
410
415
  - lib/locale/en.yml
411
416
  - lib/locale/it.yml
412
417
  - lib/loops/base.rb