red_base 0.5.1 → 0.6.0

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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -10
  3. data/app/assets/javascripts/red_base/dashboard/app.js +10 -2
  4. data/app/assets/javascripts/red_base/dashboard/lib/ng-quick-date.js +297 -0
  5. data/app/assets/javascripts/red_base/dashboard/locale/translations.js~ +4 -0
  6. data/app/assets/javascripts/red_base/dashboard/modules/auth/user.js +1 -1
  7. data/app/assets/javascripts/red_base/dashboard/modules/list-view.js~ +20 -0
  8. data/app/assets/javascripts/red_base/dashboard/modules/user.js~ +4 -0
  9. data/app/assets/javascripts/red_base/dashboard/templates/application.handlebars.erb~ +39 -0
  10. data/app/assets/javascripts/red_base/dashboard/templates/auth/groups/details.handlebars.erb~ +15 -0
  11. data/app/assets/javascripts/red_base/dashboard/templates/auth/groups/index.handlebars.erb~ +7 -0
  12. data/app/assets/javascripts/red_base/dashboard/templates/auth/index.handlebars.erb~ +4 -0
  13. data/app/assets/javascripts/red_base/dashboard/{init.js~ → templates/auth/users/details.handlebars.erb~} +0 -0
  14. data/app/assets/javascripts/red_base/dashboard/templates/auth/users/index.handlebars.erb~ +7 -0
  15. data/app/assets/javascripts/red_base/dashboard/templates/auth/users/new.handlebars.erb~ +1 -0
  16. data/app/assets/javascripts/red_base/dashboard/templates/auth/users/new.handlebars~ +1 -0
  17. data/app/assets/javascripts/red_base/dashboard/templates/components/model-form.handlebars.erb~ +1 -0
  18. data/app/assets/javascripts/red_base/dashboard/templates/components/model-from.handlebars.erb~ +1 -0
  19. data/app/assets/javascripts/red_base/i18n.js~ +2 -0
  20. data/app/assets/javascripts/red_base/locale/fa.json~ +27 -0
  21. data/app/assets/stylesheets/red_base/#base.css.scss# +403 -0
  22. data/app/assets/stylesheets/red_base/application.ltr.css~ +4 -0
  23. data/app/assets/stylesheets/red_base/application.rtl.css~ +4 -0
  24. data/app/assets/stylesheets/red_base/dashboard/ltr/application.css +2 -0
  25. data/app/assets/stylesheets/red_base/dashboard/ltr/application.css~ +19 -0
  26. data/app/assets/stylesheets/red_base/dashboard/ltr/buttons.css.scss.erb~ +48 -0
  27. data/app/assets/stylesheets/red_base/dashboard/ltr/direction.css.scss~ +14 -0
  28. data/app/assets/stylesheets/red_base/dashboard/ltr/foundation_and_overrides.css.scss~ +1039 -0
  29. data/app/assets/stylesheets/red_base/dashboard/ng-quick-date-default-theme.css.scss +20 -0
  30. data/app/assets/stylesheets/red_base/dashboard/ng-quick-date.css.scss +19 -0
  31. data/app/assets/stylesheets/red_base/foundation_and_overrides.ltr.scss.erb~ +1012 -0
  32. data/app/assets/stylesheets/red_base/foundation_and_overrides.rtl.scss.erb~ +1012 -0
  33. data/app/assets/{stylesheets/red_base/dashboard/rtl/base.css.scss~ → templates/list-view/index.html~} +0 -0
  34. data/app/assets/templates/modules.html~ +1 -0
  35. data/app/controllers/red_base/omniauth/callbacks_controller.rb~ +46 -0
  36. data/app/views/angularjs_templates/#index.html# +8 -0
  37. data/app/views/layouts/red_base/dashboard.html.erb~ +17 -0
  38. data/config/initializers/fast_gettext.rb~ +4 -0
  39. data/lib/generators/red_base/js_scaffold_generator.rb +1 -0
  40. data/lib/generators/red_base/templates/angularjs/index.html.erb +1 -1
  41. data/lib/generators/red_base/templates/angularjs/new.html.erb +5 -1
  42. data/lib/generators/red_base/templates/fast_gettext.rb~ +4 -0
  43. data/lib/red_base/dashboard/{module.rb~ → controller.rb~} +2 -2
  44. data/lib/red_base/omniauth/callbacks.rb~ +44 -0
  45. data/lib/red_base/version.rb +1 -1
  46. data/lib/tasks/gettext.rb~ +7 -0
  47. data/{lib/generators/red_base/templates/angularjs/details.html.erb~ → spec/dummy/db/test.sqlite3} +0 -0
  48. data/{lib/generators/red_base/templates/views/index.json.jbuilder.erb~ → spec/dummy/log/development.log} +0 -0
  49. data/spec/dummy/log/test.log +15 -0
  50. data/spec/dummy/tmp/ember-rails/ember-data.js +10204 -0
  51. data/spec/dummy/tmp/ember-rails/ember.js +36991 -0
  52. metadata +246 -216
  53. data/app/assets/stylesheets/red_base/dashboard/ltr/base.css.scss~ +0 -15
  54. data/app/assets/stylesheets/red_base/mixins.css.scss~ +0 -7
  55. data/app/controllers/red_base/users/omniauth_callbacks_controller.rb~ +0 -2
  56. data/app/views/angularjs_templates/nav.html.erb~ +0 -43
  57. data/lib/devise_patch.rb~ +0 -5
  58. data/lib/generators/red_base/templates/README~ +0 -4
  59. data/lib/generators/red_base/templates/api/controller.rb.erb~ +0 -37
  60. data/lib/generators/red_base/templates/red_base.rb~ +0 -251
  61. data/lib/red_base/active_record.rb~ +0 -0
  62. data/lib/red_base/dashboard.rb~ +0 -18
  63. data/lib/red_base/omniauth.rb~ +0 -1
  64. data/lib/red_base/omniauth/callbakcs.rb~ +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35cc494517908d2e1afe73aa4b648b0c9a959295
4
- data.tar.gz: fe6fc890fc0176912c16d9f8fba46cc6c04bd9d8
3
+ metadata.gz: 625f6ddeb49abf49aaa741b3ee142d807727c1bb
4
+ data.tar.gz: 710c799f08341f0c52a92cf5fc3de86b173c6979
5
5
  SHA512:
6
- metadata.gz: a46e85f90b450957e6981b512b88feafe8f213ff53dcc3b17a39ceda9dea245cdaaeda565aff7de8d5cbddf985640db3e8e5a8bb3d2bcd61bc5fe5a26fbf09f5
7
- data.tar.gz: 088f67b8ae3f099145572400e3e92b3359f780f4183ce1027524517bfc8b2695e3ca9040a69091265f3d4f44c3a287d3d8a49df37a40078f8b51c26765ae00df
6
+ metadata.gz: 510f3184262feb9d751988935abe7c74aec8ae2e928ae1e1e1838b390fee83d76e29c5667f9e575bdb585e2f68b1f86bbbefd40289bad98bc3c1c7f1370c8a0a
7
+ data.tar.gz: d731ba3e54fc1e09403ecb960dcce8c0c83a07d9e46de4ae3f30177a5e3b5dda4f7e3207bc6649b0d95e3ee7775b300db403f71b3b78a8d5aa1994179c6db7a7
data/README.md CHANGED
@@ -1,14 +1,13 @@
1
- = RedBase
2
-
3
- {<img src="https://badge.fury.io/rb/red_base.png" alt="Gem Version" />}[http://badge.fury.io/rb/red_base]
1
+ # RedBase [![Gem Version](https://badge.fury.io/rb/red_base.png)](http://badge.fury.io/rb/red_base)
4
2
 
5
3
  RedBase is a ruby on rails engine which provides a basic features of a web application. It provide a very
6
4
  robust dashboard subsystem with some fantastic generators which provide rapid productivity.
7
5
 
8
- == Dependencies
6
+ ## Dependencies
9
7
 
10
8
  * Add this to your Gemfile:
11
9
 
10
+ ```ruby
12
11
  group :development, :test do
13
12
  gem 'rspec-rails', '~> 3.0.0.beta'
14
13
  gem "capybara"
@@ -17,13 +16,14 @@ group :development, :test do
17
16
  gem "email_spec"
18
17
  gem "cucumber-rails", :require => false
19
18
  end
19
+ ```
20
20
 
21
- == Installation
21
+ ## Installation
22
22
 
23
23
  1. Add this to your `config/environments/development.rb`
24
24
 
25
25
  ```ruby
26
- config.action_mailer.default_url_options = { :host => 'localhost:3000' }
26
+ config.action_mailer.default_url_options = { :host => 'localhost:3000' }
27
27
  ```
28
28
 
29
29
  In production, :host should be set to the actual host of your application.
@@ -31,10 +31,10 @@ In production, :host should be set to the actual host of your application.
31
31
  2. Ensure you have flash messages in app/views/layouts/application.html.erb.
32
32
  For example (Only if you want to change default layout):
33
33
 
34
- '''html
35
- <p class="notice"><%= notice %></p>
36
- <p class="alert"><%= alert %></p>
37
- '''
34
+ ```rhtml
35
+ <p class="notice"><%= notice %></p>
36
+ <p class="alert"><%= alert %></p>
37
+ ```
38
38
 
39
39
 
40
40
  3. Perfrom `rails generate red_base:install_all` to copy necessary files.
@@ -22,7 +22,7 @@
22
22
  //= require_self
23
23
  //= require ./locale/translations
24
24
 
25
- var dependencies = ["gettext", "Modules", "Navigation", "ngAnimate", "ngRoute", "restangular"].concat(dashboard_dependencies);
25
+ var dependencies = ["gettext", "Modules", "Navigation", "ngAnimate", "ngRoute", "restangular", "ngQuickDate"].concat(dashboard_dependencies);
26
26
 
27
27
  console.log("Dashboard dependencies:");
28
28
  console.log(dependencies);
@@ -37,7 +37,15 @@ Dashboard.config(['$routeProvider', function($routeProvider) {
37
37
 
38
38
  }]);
39
39
 
40
- Dashboard.config(["RestangularProvider", "$httpProvider", function(RestangularProvider, $httpProvider) {
40
+ Dashboard.config(["RestangularProvider", "$httpProvider", "ngQuickDateDefaultsProvider", function(RestangularProvider, $httpProvider, ngQuickDateDefaultsProvider) {
41
+
42
+ ngQuickDateDefaultsProvider.set({
43
+ closeButtonHtml: "<i class='fa fa-times'></i>",
44
+ buttonIconHtml: "<i class='fa fa-calendar'></i>",
45
+ nextLinkHtml: "<i class='fa fa-chevron-right'></i>",
46
+ prevLinkHtml: "<i class='fa fa-chevron-left'></i>"
47
+ });
48
+
41
49
  RestangularProvider.setBaseUrl('/api/v1');
42
50
 
43
51
  $httpProvider.defaults.headers.common.lang = $("html").attr("lang");
@@ -0,0 +1,297 @@
1
+ (function() {
2
+ var app;
3
+
4
+ app = angular.module("ngQuickDate", []);
5
+
6
+ app.provider("ngQuickDateDefaults", function() {
7
+ return {
8
+ options: {
9
+ dateFormat: 'M/d/yyyy',
10
+ timeFormat: 'h:mm a',
11
+ labelFormat: null,
12
+ placeholder: 'Click to Set Date',
13
+ hoverText: null,
14
+ buttonIconHtml: null,
15
+ closeButtonHtml: 'X',
16
+ nextLinkHtml: 'Next',
17
+ prevLinkHtml: 'Prev',
18
+ disableTimepicker: false,
19
+ disableClearButton: false,
20
+ dayAbbreviations: ["Su", "M", "Tu", "W", "Th", "F", "Sa"],
21
+ parseDateFunction: function(str) {
22
+ var seconds;
23
+ seconds = Date.parse(str);
24
+ if (isNaN(seconds)) {
25
+ return null;
26
+ } else {
27
+ return new Date(seconds);
28
+ }
29
+ }
30
+ },
31
+ $get: function() {
32
+ return this.options;
33
+ },
34
+ set: function(keyOrHash, value) {
35
+ var k, v, _results;
36
+ if (typeof keyOrHash === 'object') {
37
+ _results = [];
38
+ for (k in keyOrHash) {
39
+ v = keyOrHash[k];
40
+ _results.push(this.options[k] = v);
41
+ }
42
+ return _results;
43
+ } else {
44
+ return this.options[keyOrHash] = value;
45
+ }
46
+ }
47
+ };
48
+ });
49
+
50
+ app.directive("datepicker", [
51
+ 'ngQuickDateDefaults', '$filter', '$sce', function(ngQuickDateDefaults, $filter, $sce) {
52
+ return {
53
+ restrict: "E",
54
+ require: "ngModel",
55
+ scope: {
56
+ ngModel: "=",
57
+ onChange: "&"
58
+ },
59
+ replace: true,
60
+ link: function(scope, element, attrs, ngModel) {
61
+ var dateToString, datepickerClicked, datesAreEqual, debug, getDaysInMonth, initialize, parseDateString, setCalendarDateFromModel, setCalendarRows, setConfigOptions, setInputDateFromModel;
62
+ debug = attrs.debug && attrs.debug.length;
63
+ initialize = function() {
64
+ scope.toggleCalendar(false);
65
+ scope.weeks = [];
66
+ scope.inputDate = null;
67
+ if (typeof scope.ngModel === 'string') {
68
+ scope.ngModel = parseDateString(scope.ngModel);
69
+ }
70
+ setConfigOptions();
71
+ setInputDateFromModel();
72
+ return setCalendarDateFromModel();
73
+ };
74
+ setConfigOptions = function() {
75
+ var key, value;
76
+ for (key in ngQuickDateDefaults) {
77
+ value = ngQuickDateDefaults[key];
78
+ if (key.match(/[Hh]tml/)) {
79
+ scope[key] = $sce.trustAsHtml(ngQuickDateDefaults[key] || "");
80
+ } else if (attrs[key]) {
81
+ scope[key] = attrs[key];
82
+ } else {
83
+ scope[key] = ngQuickDateDefaults[key];
84
+ }
85
+ }
86
+ if (!scope.labelFormat) {
87
+ scope.labelFormat = scope.dateFormat;
88
+ if (!scope.disableTimepicker) {
89
+ scope.labelFormat += " " + scope.timeFormat;
90
+ }
91
+ }
92
+ if (attrs.iconClass && attrs.iconClass.length) {
93
+ return scope.buttonIconHtml = $sce.trustAsHtml("<i ng-show='iconClass' class='" + attrs.iconClass + "'></i>");
94
+ }
95
+ };
96
+ datepickerClicked = false;
97
+ window.document.addEventListener('click', function(event) {
98
+ if (!datepickerClicked) {
99
+ scope.toggleCalendar(false);
100
+ scope.$apply();
101
+ }
102
+ return datepickerClicked = false;
103
+ });
104
+ angular.element(element[0])[0].addEventListener('click', function(event) {
105
+ return datepickerClicked = true;
106
+ });
107
+ setInputDateFromModel = function() {
108
+ if (scope.ngModel) {
109
+ scope.inputDate = $filter('date')(scope.ngModel, ngQuickDateDefaults.dateFormat);
110
+ return scope.inputTime = $filter('date')(scope.ngModel, ngQuickDateDefaults.timeFormat);
111
+ } else {
112
+ scope.inputDate = null;
113
+ return scope.inputTime = null;
114
+ }
115
+ };
116
+ setCalendarDateFromModel = function() {
117
+ var d;
118
+ d = scope.ngModel ? new Date(scope.ngModel) : new Date();
119
+ if (d.toString() === "Invalid Date") {
120
+ d = new Date();
121
+ }
122
+ d.setDate(1);
123
+ return scope.calendarDate = new Date(d);
124
+ };
125
+ setCalendarRows = function() {
126
+ var curDate, d, day, daysInMonth, numRows, offset, row, selected, today, weeks, _i, _j, _ref;
127
+ offset = scope.calendarDate.getDay();
128
+ daysInMonth = getDaysInMonth(scope.calendarDate.getFullYear(), scope.calendarDate.getMonth());
129
+ numRows = Math.ceil((offset + daysInMonth) / 7);
130
+ weeks = [];
131
+ curDate = new Date(scope.calendarDate);
132
+ curDate.setDate(curDate.getDate() + (offset * -1));
133
+ for (row = _i = 0, _ref = numRows - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; row = 0 <= _ref ? ++_i : --_i) {
134
+ weeks.push([]);
135
+ for (day = _j = 0; _j <= 6; day = ++_j) {
136
+ d = new Date(curDate);
137
+ selected = scope.ngModel && d && datesAreEqual(d, scope.ngModel);
138
+ today = datesAreEqual(d, new Date());
139
+ weeks[row].push({
140
+ date: d,
141
+ selected: selected,
142
+ other: d.getMonth() !== scope.calendarDate.getMonth(),
143
+ today: today
144
+ });
145
+ curDate.setDate(curDate.getDate() + 1);
146
+ }
147
+ }
148
+ return scope.weeks = weeks;
149
+ };
150
+ dateToString = function(date, format) {
151
+ return $filter('date')(date, format);
152
+ };
153
+ parseDateString = ngQuickDateDefaults.parseDateFunction;
154
+ datesAreEqual = function(d1, d2, compareTimes) {
155
+ if (compareTimes == null) {
156
+ compareTimes = false;
157
+ }
158
+ if (compareTimes) {
159
+ return (d1 - d2) === 0;
160
+ } else {
161
+ return d1 && d2 && (d1.getYear() === d2.getYear()) && (d1.getMonth() === d2.getMonth()) && (d1.getDate() === d2.getDate());
162
+ }
163
+ };
164
+ getDaysInMonth = function(year, month) {
165
+ return [31, ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0 ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
166
+ };
167
+ scope.$watch('ngModel', function(newVal, oldVal) {
168
+ if (newVal !== oldVal) {
169
+ setInputDateFromModel();
170
+ return setCalendarDateFromModel();
171
+ }
172
+ });
173
+ scope.$watch('calendarDate', function(newVal, oldVal) {
174
+ if (newVal !== oldVal) {
175
+ return setCalendarRows();
176
+ }
177
+ });
178
+ scope.$watch('calendarShown', function(newVal, oldVal) {
179
+ var dateInput;
180
+ dateInput = angular.element(element[0].querySelector(".quickdate-date-input"))[0];
181
+ return dateInput.select();
182
+ });
183
+ scope.mainButtonStr = function() {
184
+ if (scope.ngModel) {
185
+ return $filter('date')(scope.ngModel, scope.labelFormat);
186
+ } else {
187
+ return scope.placeholder;
188
+ }
189
+ };
190
+ scope.toggleCalendar = function(show) {
191
+ if (isFinite(show)) {
192
+ return scope.calendarShown = show;
193
+ } else {
194
+ return scope.calendarShown = !scope.calendarShown;
195
+ }
196
+ };
197
+ scope.setDate = function(date, closeCalendar) {
198
+ var changed;
199
+ if (closeCalendar == null) {
200
+ closeCalendar = true;
201
+ }
202
+ changed = (!scope.ngModel && date) || (scope.ngModel && !date) || (date.getTime() !== scope.ngModel.getTime());
203
+ scope.ngModel = date;
204
+ if (closeCalendar) {
205
+ scope.toggleCalendar(false);
206
+ }
207
+ if (changed && scope.onChange) {
208
+ return scope.onChange();
209
+ }
210
+ };
211
+ scope.setDateFromInput = function(closeCalendar) {
212
+ var err, tmpDate, tmpDateAndTime, tmpTime;
213
+ if (closeCalendar == null) {
214
+ closeCalendar = false;
215
+ }
216
+ try {
217
+ tmpDate = parseDateString(scope.inputDate);
218
+ if (!tmpDate) {
219
+ throw 'Invalid Date';
220
+ }
221
+ if (!scope.disableTimepicker && scope.inputTime && scope.inputTime.length && tmpDate) {
222
+ tmpTime = scope.disableTimepicker ? '00:00:00' : scope.inputTime;
223
+ tmpDateAndTime = parseDateString("" + scope.inputDate + " " + tmpTime);
224
+ if (!tmpDateAndTime) {
225
+ throw 'Invalid Time';
226
+ }
227
+ scope.setDate(tmpDateAndTime, false);
228
+ } else {
229
+ scope.setDate(tmpDate, false);
230
+ }
231
+ if (closeCalendar) {
232
+ scope.toggleCalendar(false);
233
+ }
234
+ scope.inputDateErr = false;
235
+ return scope.inputTimeErr = false;
236
+ } catch (_error) {
237
+ err = _error;
238
+ if (err === 'Invalid Date') {
239
+ return scope.inputDateErr = true;
240
+ } else if (err === 'Invalid Time') {
241
+ return scope.inputTimeErr = true;
242
+ }
243
+ }
244
+ };
245
+ scope.onDateInputTab = function(param) {
246
+ if (scope.disableTimepicker) {
247
+ scope.toggleCalendar(false);
248
+ }
249
+ return true;
250
+ };
251
+ scope.onTimeInputTab = function(param) {
252
+ scope.toggleCalendar(false);
253
+ return true;
254
+ };
255
+ scope.nextMonth = function() {
256
+ return scope.calendarDate = new Date(new Date(scope.calendarDate).setMonth(scope.calendarDate.getMonth() + 1));
257
+ };
258
+ scope.prevMonth = function() {
259
+ return scope.calendarDate = new Date(new Date(scope.calendarDate).setMonth(scope.calendarDate.getMonth() - 1));
260
+ };
261
+ scope.clear = function() {
262
+ scope.ngModel = null;
263
+ return scope.toggleCalendar(false);
264
+ };
265
+ initialize();
266
+ setCalendarRows();
267
+ if (debug) {
268
+ return console.log("quick date scope:", scope);
269
+ }
270
+ },
271
+ template: "<div class='quickdate'>\n <a href='' ng-focus='toggleCalendar(true)' ng-click='toggleCalendar()' class='quickdate-button' title='{{hoverText}}'><div ng-hide='iconClass' ng-bind-html='buttonIconHtml'></div>{{mainButtonStr()}}</a>\n <div class='quickdate-popup' ng-class='{open: calendarShown}'>\n <a href='' tabindex='-1' class='quickdate-close' ng-click='toggleCalendar()'><div ng-bind-html='closeButtonHtml'></div></a>\n <div class='quickdate-text-inputs'>\n <div class='quickdate-input-wrapper'>\n <label>Date</label>\n <input class='quickdate-date-input' name='inputDate' type='text' ng-model='inputDate' placeholder='1/1/2013' ng-blur=\"setDateFromInput()\" ng-enter=\"setDateFromInput(true)\" ng-class=\"{'ng-quick-date-error': inputDateErr}\" ng-tab='onDateInputTab()' />\n </div>\n <div class='quickdate-input-wrapper' ng-hide='disableTimepicker'>\n <label>Time</label>\n <input class='quickdate-time-input' name='inputTime' type='text' ng-model='inputTime' placeholder='12:00 PM' ng-blur=\"setDateFromInput(false)\" ng-enter=\"setDateFromInput(true)\" ng-class=\"{'quickdate-error': inputTimeErr}\" ng-tab='onTimeInputTab()'>\n </div>\n </div>\n <div class='quickdate-calendar-header'>\n <a href='' class='quickdate-prev-month quickdate-action-link' tabindex='-1' ng-click='prevMonth()'><div ng-bind-html='prevLinkHtml'></div></a>\n <span class='quickdate-month'>{{calendarDate | date:'MMMM yyyy'}}</span>\n <a href='' class='quickdate-next-month quickdate-action-link' ng-click='nextMonth()' tabindex='-1' ><div ng-bind-html='nextLinkHtml'></div></a>\n </div>\n <table class='quickdate-calendar'>\n <thead>\n <tr>\n <th ng-repeat='day in dayAbbreviations'>{{day}}</th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat='week in weeks'>\n <td ng-mousedown='setDate(day.date)' ng-class='{\"other-month\": day.other, \"selected\": day.selected, \"is-today\": day.today}' ng-repeat='day in week'>{{day.date | date:'d'}}</td>\n </tr>\n </tbody>\n </table>\n <div class='quickdate-popup-footer'>\n <a href='' class='quickdate-clear' tabindex='-1' ng-hide='disableClearButton' ng-click='clear()'>Clear</a>\n </div>\n </div>\n</div>"
272
+ };
273
+ }
274
+ ]);
275
+
276
+ app.directive('ngEnter', function() {
277
+ return function(scope, element, attr) {
278
+ return element.bind('keydown keypress', function(e) {
279
+ if (e.which === 13) {
280
+ scope.$apply(attr.ngEnter);
281
+ return e.preventDefault();
282
+ }
283
+ });
284
+ };
285
+ });
286
+
287
+ app.directive('ngTab', function() {
288
+ return function(scope, element, attr) {
289
+ return element.bind('keydown keypress', function(e) {
290
+ if (e.which === 9) {
291
+ return scope.$apply(attr.ngTab);
292
+ }
293
+ });
294
+ };
295
+ });
296
+
297
+ }).call(this);
@@ -0,0 +1,4 @@
1
+ angular.module("Dashboard").run(['gettextCatalog', function (gettextCatalog) {
2
+ gettextCatalog.setStrings('fa', {"Menu":"منو","Languages":"زبان ها","Dashboard":"بخش کاربری","Change Password":"تغییر کامه عبور","Sign Out":"خروج"});
3
+
4
+ }]);
@@ -111,7 +111,7 @@ User.controller("AddUsersController", ["$scope","Restangular","$location" ,"$rou
111
111
  }else{
112
112
  API.all("users").post(user).then(function(){
113
113
  success_message(gettext("User created Successfully"));
114
- //$location.path("/auth/users");
114
+ $location.path("/auth/users");
115
115
  }).catch(catch_error);
116
116
  }
117
117
  };
@@ -0,0 +1,20 @@
1
+ /* -----------------------------------------------------------------------------
2
+ Red Base - Basic website skel engine
3
+ Copyright (C) 2012-2013 Yellowen
4
+
5
+ This program is free software; you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation; either version 2 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License along
16
+ with this program; if not, write to the Free Software Foundation, Inc.,
17
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
+ ----------------------------------------------------------------------------- */
19
+
20
+ var ListView = angular.module("ListView", []);
@@ -0,0 +1,4 @@
1
+ when("/auth/users", {
2
+ templateUrl: template("auth/users/index"),
3
+ controller: ""
4
+ });
@@ -0,0 +1,39 @@
1
+ <div id="mainloader">
2
+ <div class="text">
3
+ <p><i class="fa fa-spin fa-refresh fa-2x"></i></p>
4
+ <h5><%= _("Please wait") %> . . .</h5>
5
+ </div>
6
+ </div>
7
+ <div id="content" class="hide">
8
+ <header>
9
+ {{ render "navigation" }}
10
+ </header>
11
+
12
+ <section class="dashboard-body">
13
+ <div class="row">
14
+ <aside class="modulebar small-2 columns">
15
+ {{ render "modules"}}
16
+ </aside>
17
+ <section class="small-10 columns dashboard-content">
18
+
19
+ <div class="row content">
20
+ <div id="flash" class="row success">
21
+ <div class="small-12 columns">
22
+ </div>
23
+ </div>
24
+ </div>
25
+
26
+ <div class="row">
27
+ <div class="small-4 columns text-right search-bar right">
28
+ <input type="search" class="small-12 columns left" placeholder="Search ..."/>
29
+ </div>
30
+ </div>
31
+ <div class="row content">
32
+ {{ outlet }}
33
+ </div>
34
+
35
+ </section>
36
+
37
+ </div>
38
+ </section>
39
+ </div>