faalis 1.0.0.alpha0 → 1.0.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +44 -22
  3. data/Rakefile +1 -0
  4. data/app/assets/javascripts/faalis/angular-manifest.js +1 -0
  5. data/app/assets/javascripts/faalis/dashboard/app.js +4 -3
  6. data/app/assets/javascripts/faalis/dashboard/application.js.erb +0 -1
  7. data/app/assets/javascripts/faalis/dashboard/functions.js.erb +5 -7
  8. data/app/assets/javascripts/faalis/dashboard/init.js +1 -2
  9. data/app/assets/javascripts/faalis/dashboard/modules/fields/datetime.js +5 -3
  10. data/app/assets/javascripts/faalis/dashboard/modules/fields/image.js +46 -105
  11. data/app/assets/javascripts/faalis/dashboard/modules/services/upload_service.js +17 -0
  12. data/app/assets/javascripts/faalis/dashboard/variables.js.erb +1 -1
  13. data/app/assets/javascripts/faalis/{locale → locales}/en.json +0 -0
  14. data/app/assets/javascripts/faalis/{locale → locales}/fa.json +0 -0
  15. data/app/assets/javascripts/faalis/locales/translations.fa.js +4 -0
  16. data/app/assets/locale/templates.fa.pot +275 -0
  17. data/app/assets/locale/templates.pot +0 -8
  18. data/app/controllers/faalis/#api_controller.rb# +51 -0
  19. data/app/controllers/faalis/#dashboard_controller.rb# +65 -0
  20. data/app/controllers/faalis/application_controller.rb +9 -10
  21. data/app/controllers/faalis/dashboard_controller.rb +2 -2
  22. data/app/models/faalis/user.rb +11 -11
  23. data/app/models/faalis/user/auth_definitions.rb +2 -14
  24. data/app/models/faalis/user/mongoid_fields.rb +0 -1
  25. data/app/views/angularjs_templates/fields/datetime/datetime.html +7 -1
  26. data/app/views/angularjs_templates/fields/image/image.html +1 -1
  27. data/app/views/angularjs_templates/index.html +1 -6
  28. data/app/views/angularjs_templates/modules.html +1 -1
  29. data/app/views/devise/registrations/new.html.erb +5 -1
  30. data/app/views/devise/sessions/new.html.erb +17 -16
  31. data/app/views/devise/shared/_links.erb +8 -6
  32. data/app/views/layouts/faalis/application.html.erb +0 -4
  33. data/app/views/layouts/faalis/dashboard.html.erb +2 -2
  34. data/app/views/layouts/faalis/simple.html.erb +18 -20
  35. data/config/locales/fa/LC_MESSAGES/faalis.mo +0 -0
  36. data/config/locales/fa/faalis.edit.mo +0 -0
  37. data/config/locales/fa/faalis.edit.po +104 -0
  38. data/config/locales/fa/faalis.mo +0 -0
  39. data/config/locales/fa/faalis.po +29 -108
  40. data/{app/controllers/faalis/#1.sh# → config/locales/fa/faalis.po.time_stamp} +0 -0
  41. data/config/locales/faalis.pot +10 -88
  42. data/config/routes.rb +16 -3
  43. data/lib/faalis.rb +1 -0
  44. data/lib/faalis/discovery/permissions.rb +10 -3
  45. data/lib/faalis/engine.rb +21 -0
  46. data/lib/faalis/generators/concerns.rb +2 -0
  47. data/lib/faalis/generators/concerns/allow_query_on.rb +8 -12
  48. data/lib/faalis/generators/concerns/angular.rb +4 -5
  49. data/lib/faalis/generators/concerns/child.rb +31 -0
  50. data/lib/faalis/generators/concerns/fieldset.rb +2 -2
  51. data/lib/faalis/generators/concerns/globalize.rb +14 -0
  52. data/lib/faalis/generators/concerns/hstore.rb +19 -0
  53. data/lib/faalis/generators/concerns/model.rb +3 -3
  54. data/lib/faalis/generators/concerns/parent.rb +4 -6
  55. data/lib/faalis/generators/concerns/required.rb +2 -1
  56. data/lib/faalis/generators/concerns/resource_name.rb +1 -0
  57. data/lib/faalis/generators/concerns/tabs.rb +4 -7
  58. data/lib/faalis/generators/concerns/where.rb +1 -3
  59. data/lib/faalis/generators/dashboard_scaffold.rb +2 -0
  60. data/lib/faalis/generators/fields/#relation.rb# +61 -0
  61. data/lib/faalis/i18n.rb +6 -1
  62. data/lib/faalis/middlewares.rb +1 -0
  63. data/lib/faalis/middlewares/locale.rb +29 -0
  64. data/lib/faalis/route.rb +12 -19
  65. data/lib/faalis/version.rb +1 -1
  66. data/lib/generators/faalis/install_all_generator.rb +5 -3
  67. data/lib/generators/faalis/install_generator.rb +4 -0
  68. data/lib/generators/faalis/js/install_i18n_generator.rb +1 -1
  69. data/lib/generators/faalis/scaffold_generator.rb +72 -25
  70. data/lib/generators/faalis/templates/i18n/Gruntfile.js.erb +2 -2
  71. data/lib/generators/faalis/templates/i18n/fa.js +2 -2
  72. data/lib/generators/faalis/templates/js/list_view/details.html.erb +26 -3
  73. data/lib/generators/faalis/templates/views/create.json.jbuilder.erb +2 -1
  74. data/lib/generators/faalis/templates/views/index.json.jbuilder.erb +4 -2
  75. data/lib/generators/faalis/templates/views/show.json.jbuilder.erb +2 -1
  76. data/lib/generators/faalis/templates/views/update.json.jbuilder.erb +2 -1
  77. data/lib/tasks/faalis_tasks.rake +25 -27
  78. data/lib/tasks/grunt/Gruntfile.js +2 -2
  79. data/lib/tasks/sync.rake +3 -4
  80. metadata +43 -90
  81. data/app/assets/javascripts/faalis/dashboard/modules/list-view.js +0 -341
  82. data/app/assets/javascripts/faalis/dashboard/modules/modules.js +0 -75
  83. data/app/assets/javascripts/faalis/dashboard/modules/nav.js.erb +0 -78
  84. data/app/assets/stylesheets/faalis/base.css.scss +0 -334
  85. data/app/assets/stylesheets/faalis/dashboard/dashboard.css.scss +0 -246
  86. data/app/assets/stylesheets/faalis/dashboard/list_view.css.scss +0 -169
  87. data/app/assets/stylesheets/faalis/dashboard/ltr/application.css +0 -29
  88. data/app/assets/stylesheets/faalis/dashboard/ltr/base.css.scss.erb +0 -33
  89. data/app/assets/stylesheets/faalis/dashboard/ltr/buttons.css.scss.erb +0 -55
  90. data/app/assets/stylesheets/faalis/dashboard/ltr/direction.css.scss +0 -38
  91. data/app/assets/stylesheets/faalis/dashboard/ltr/foundation_and_overrides.css.scss +0 -1261
  92. data/app/assets/stylesheets/faalis/dashboard/ltr/time.css.scss +0 -58
  93. data/app/assets/stylesheets/faalis/dashboard/rtl/application.css +0 -27
  94. data/app/assets/stylesheets/faalis/dashboard/rtl/base.css.scss.erb +0 -35
  95. data/app/assets/stylesheets/faalis/dashboard/rtl/buttons.css.scss.erb +0 -45
  96. data/app/assets/stylesheets/faalis/dashboard/rtl/direction.css.scss +0 -37
  97. data/app/assets/stylesheets/faalis/dashboard/rtl/foundation_and_overrides.css.scss +0 -1264
  98. data/app/assets/stylesheets/faalis/dashboard/share/time.css.scss +0 -57
  99. data/app/assets/stylesheets/faalis/dashboard/sidebar.css.scss +0 -93
  100. data/app/assets/stylesheets/faalis/devise.css.scss +0 -34
  101. data/app/assets/stylesheets/faalis/groups.css +0 -4
  102. data/app/assets/stylesheets/faalis/home.css.scss +0 -14
  103. data/app/assets/stylesheets/faalis/ltr/application.css +0 -20
  104. data/app/assets/stylesheets/faalis/ltr/buttons.css.scss.erb +0 -45
  105. data/app/assets/stylesheets/faalis/ltr/foundation_and_overrides.scss +0 -1258
  106. data/app/assets/stylesheets/faalis/mixins.css.scss +0 -15
  107. data/app/assets/stylesheets/faalis/rtl/application.css +0 -20
  108. data/app/assets/stylesheets/faalis/rtl/buttons.css.scss.erb +0 -50
  109. data/app/assets/stylesheets/faalis/rtl/foundation_and_overrides.css.scss +0 -1264
  110. data/app/assets/stylesheets/faalis/users.css +0 -4
  111. data/app/assets/stylesheets/faalis/variables.css.scss +0 -102
  112. data/app/controllers/faalis/api/v1/workflows_controller.rb +0 -18
  113. data/app/views/angularjs_templates/list-view/index.html +0 -82
  114. data/app/views/faalis/api/v1/workflows/index.json.jbuilder +0 -5
  115. data/app/workflows/faalis/administration_workflow.rb +0 -7
  116. data/spec/dummy/log/development.log +0 -0
  117. data/spec/dummy/log/test.log +0 -15
  118. data/spec/dummy/tmp/ember-rails/ember-data.js +0 -10204
  119. data/spec/dummy/tmp/ember-rails/ember.js +0 -36991
  120. data/spec/factories/faalis_workflows.rb +0 -7
  121. data/spec/models/faalis/workflow_spec.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4c74b374989627938bcfa2c1e0384c0e34cd96b
4
- data.tar.gz: f571016a6e308819a746c9e3049114711f0a12e0
3
+ metadata.gz: decd01b9d5bbffe1b8191a729790ba08c06cb249
4
+ data.tar.gz: 210c6a7fbd8c2e7503aebc239c67f80e016765a1
5
5
  SHA512:
6
- metadata.gz: a46e6d62645567c5f6eb946078f4cf4722662b633376dfd3805a1b8ccfee8e04bf4be5bb486530aa1a0ad819031a4f0941d2f3561e34fa327d964b7df1986f8b
7
- data.tar.gz: 03a7ed19e79ec8aca23ba36b4541eb02a450b0dd7dfb37706cc2ab4c16ec7e7b0826df504582b7d0db8a80fba0931c0acd2c50ff75873abde4b7485cd9ed3b3c
6
+ metadata.gz: 0a5cafb51d5ecea46ed6984ffd27f7c961100d2c98dd40d1bcddff420c77520ee8ab5175c06e6090886ce585b3728a032bf7755c6852b2e794bc354798519aa4
7
+ data.tar.gz: a560057a8878fdcb0c152ac6dce76b859f5fa09d368053e3d9b5498c297bb87f494df9cf72e54cfa1d078b0f68acc9c1fda3f22442a4d4bd8e9bad73f7676d5e
data/README.md CHANGED
@@ -1,11 +1,21 @@
1
- # Faalis [![Gem Version](https://badge.fury.io/rb/faalis.png)](http://badge.fury.io/rb/faalis)
1
+ # Faalis [![Gem Version](https://badge.fury.io/rb/faalis.png)](http://badge.fury.io/rb/faalis) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/Yellowen/Faalis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
2
2
 
3
- Faalis is a ruby on rails engine which provides a basic features of a web application. It provide a very
4
- robust dashboard subsystem with some fantastic generators which provide rapid productivity.
5
3
 
6
- ## Dependencies
4
+ **Faalis** is a **RubyOnRails** Platform for rapid web application development. It provides a very
5
+ robust dashboard subsystem with some fantastic generators and client side framework based on **AngularJS**
6
+ to improve productivity as much as possible.
7
7
 
8
- * Add this to your Gemfile:
8
+
9
+ ## Installation
10
+
11
+ * First add `rails-assets` source to your `Gemfile`:
12
+
13
+ ```ruby
14
+ source 'http://rails-assets.org'
15
+ ```
16
+ > **NOTE**: Remember to add this source not to replace the default one.
17
+
18
+ * Add `faalis` gem and it's dependencies to your `Gemfile` like:
9
19
 
10
20
  ```ruby
11
21
  group :development, :test do
@@ -16,43 +26,52 @@ group :development, :test do
16
26
  gem "email_spec"
17
27
  gem "cucumber-rails", :require => false
18
28
  end
19
- ```
20
-
21
- ## Installation
22
-
23
- 1. First add `faalis` to your `Gemfile` like
24
29
 
25
- ```ruby
26
- # Make sure to add this source to you Gemfile
27
- source 'http://rails-assets.org'
30
+ # Current Dashstrap theme for Faalis
31
+ gem "dashstrap"
28
32
 
29
33
  gem "faalis"
30
34
  ```
31
- **Note**: Make sure to add `source 'http://rails-assets.org'` to your `Gemfile`.
32
35
 
33
- 2. Iinstall your project dependencies using `bundle`
36
+ * Iinstall your project dependencies using `bundle`
34
37
 
35
38
  ```ruby
36
39
  bundle install
37
40
  ```
38
41
 
39
- 3. Add this to your `config/environments/development.rb`
42
+ * Add this to your `config/environments/development.rb`
40
43
 
41
44
  ```ruby
42
45
  config.action_mailer.default_url_options = { :host => 'localhost:3000' }
43
46
  ```
47
+ > In production, `:host` should be set to the actual host of your application.
44
48
 
45
- In production, `:host` should be set to the actual host of your application.
46
-
47
- 4. Ensure you have flash messages in `app/views/layouts/application.html.erb`.
49
+ * Ensure you have flash messages in `app/views/layouts/application.html.erb`.
48
50
  For example (Only if you want to change default layout):
49
51
 
50
52
  ```rhtml
51
53
  <p class="notice"><%= notice %></p>
52
54
  <p class="alert"><%= alert %></p>
53
55
  ```
54
- 5. Perfrom `rails generate faalis:install_all` to copy necessary files.
55
- 6. Perform `rake db:migrate` and enjoy Faalis
56
+
57
+ * Perfrom `rails generate faalis:install_all` to copy necessary files.
58
+ * Add this to your `config/routes.rb` :
59
+
60
+ ```ruby
61
+ mount Faalis::Engine => "/"
62
+ Faalis::Routes.define_api_routes
63
+ ```
64
+
65
+ * Perform `rake db:migrate` and enjoy Faalis
66
+
67
+ > **NOTE**: You change the orm you like to use in `config/initializers/faalis.rb`
68
+
69
+ ## Documents
70
+ There is couple of guides along side with **Ruby** and **JavaScript** API documents
71
+ inside the source tree. We use `yardoc` so you can build them easily or look at automated [rubydoc](http://rubydoc.info/gems/faalis)
72
+ docs.
73
+
74
+ Also take a look at [Wiki of Faalis](https://github.com/Yellowen/Faalis/wiki).
56
75
 
57
76
  ## Contributing
58
77
 
@@ -62,6 +81,9 @@ For example (Only if you want to change default layout):
62
81
  4. Push to the branch (`git push origin my-new-feature`)
63
82
  5. Create new Pull Request
64
83
 
84
+ Also you can join us in our `Gitter` group:
85
+ [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/Yellowen/Faalis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
86
+
65
87
  ## Credit
66
88
  ![Yellowen](http://www.yellowen.com/images/logo.png)
67
89
 
@@ -70,4 +92,4 @@ For example (Only if you want to change default layout):
70
92
 
71
93
  # License
72
94
 
73
- **Faalis** is Copyright © 2014 Yellowen. It is free software, and may be redistributed under the terms specified in the LICENSE file.
95
+ **Faalis** is Copyright © 2013-2014 Yellowen. It is free software, and may be redistributed under the terms specified in the LICENSE file.
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ require 'gettext_i18n_rails/tasks'
1
2
  begin
2
3
  require 'bundler/setup'
3
4
  rescue LoadError
@@ -15,3 +15,4 @@
15
15
  //= require angular-ui-select2/select2
16
16
  //= require flow
17
17
  //= require ng-flow
18
+ //= require faalis/dashboard/functions
@@ -3,13 +3,14 @@
3
3
  //= require_self
4
4
  //= require ./locale/translations
5
5
 
6
- var dependencies = ["gettext", "Modules", "Navigation","ui.select2", "ngAnimate", "ngRoute",
7
- "restangular", "ngQuickDate", "Errors", "Profile", "Permissions", "Conversation"].concat(dashboard_dependencies);
6
+ var dependencies = ["gettext", "Modules", "ui.select2",
7
+ "ngAnimate", "ngRoute", "restangular", "ngQuickDate",
8
+ "Errors", "Profile", "Permissions"].concat(dashboard_dependencies);
8
9
 
9
10
  console.log("Dashboard dependencies:");
10
11
  console.log(dependencies);
11
12
 
12
- var Dashboard = angular.module('Dashboard', dependencies);
13
+ var Dashboard = angular.module("Dashboard", dependencies);
13
14
 
14
15
  Dashboard.config(["$routeProvider", "RestangularProvider", "$httpProvider", "ngQuickDateDefaultsProvider", function($routeProvider, RestangularProvider, $httpProvider, ngQuickDateDefaultsProvider) {
15
16
 
@@ -10,7 +10,6 @@
10
10
  // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require faalis/angular-manifest
14
13
  //= require faalis/dashboard/init
15
14
  //= require faalis/dashboard/app
16
15
  //= require_tree .
@@ -1,3 +1,8 @@
1
+ function add_dependency(module) {
2
+ window.dashboard_dependencies = window.dashboard_dependencies || [];
3
+ window.dashboard_dependencies.push(module);
4
+ }
5
+
1
6
  function debug(msg) {
2
7
  if ("debug" in window) {
3
8
  if (window.debug === true) {
@@ -62,13 +67,6 @@ function show_subnav(){
62
67
  function hide_subnav(){
63
68
  }
64
69
 
65
- function show_flash_message(msg, klass) {
66
- var flash = $("#flash");
67
- $(flash).find("div").html(msg);
68
- $(flash).removeClass().addClass("row").addClass(klass).fadeIn(700).delay(5000).fadeOut(500);
69
- }
70
-
71
- function hide_flash() { $("#flash").hide(); }
72
70
  function success_message(msg){ show_flash_message(msg, "success"); }
73
71
  function warning_message(msg){ show_flash_message(msg, "warning"); }
74
72
  function error_message(msg){ show_flash_message(msg, "error"); }
@@ -1,11 +1,10 @@
1
- //= require faalis/dashboard/functions
2
1
  //= require faalis/dashboard/objects
3
2
  // Get all the modules syncly
3
+ console.log(DashboardURL);
4
4
  $.ajax({method: 'GET', type: 'json', async: false,
5
5
  url: DashboardURL + '.json'})
6
6
  .success(function(data, status, headers, config){
7
7
  DModules = data.modules;
8
-
9
8
  DModules.forEach(function(module){
10
9
  dashboard_dependencies.push(camelCase(module.resource));
11
10
  });
@@ -11,9 +11,11 @@ Datetime_.directive('datetimeField', ["$filter", "gettext", function($filter, ge
11
11
  scope.element_id = "id_" + scope.field;
12
12
  scope.msg_element_id = "id_" + scope.field + "_msg";
13
13
 
14
- if (scope.timepicker === undefined) {
14
+ if ((scope.timepicker === undefined) || (scope.timepicker == null)) {
15
15
  scope.timepicker = true;
16
16
  }
17
+ console.log(scope);
18
+ console.log(scope.timepicker);
17
19
  if (scope.on_change !== undefined) {
18
20
  // Watch event changes
19
21
  scope.$watch("model", function(newv, oldv, $scope) {
@@ -23,7 +25,7 @@ Datetime_.directive('datetimeField', ["$filter", "gettext", function($filter, ge
23
25
  }
24
26
 
25
27
  }
26
- // Actual object of <string-field> directive
28
+ // Actual object of <datetime-field> directive
27
29
  return {
28
30
  templateUrl: template("fields/datetime/datetime"),
29
31
  replace: true,
@@ -31,7 +33,7 @@ Datetime_.directive('datetimeField', ["$filter", "gettext", function($filter, ge
31
33
  transclude: true,
32
34
  scope: {
33
35
  // disable timepicker
34
- timepicker: "&",
36
+ timepicker: "=?",
35
37
 
36
38
  cssClasses: '=cssClass',
37
39
  // A call back to pass to field ng-change directive
@@ -4,112 +4,53 @@ var Image_ = angular.module("ImageField",[]);
4
4
  * <image-field></image-field>
5
5
  */
6
6
 
7
- Image_.directive('imageField',["gettext",function(gettext){
8
- function link(scope, element, attrs,ngModelController){
9
- scope.element_id = "id_" + scope.field;
10
- scope.msg_element_id = "id_" + scope.field + "_msg";
11
-
12
- function updateModel(event){
13
- if(event.target && event.target.files){
14
- var file = event.target.files[0];
15
- var reader = new FileReader();
16
- reader.onload = function(e){
17
- scope.image = e.target.result;
18
- };
19
- reader.readAsDataURL(file);
20
- }
21
- }
22
-
23
- element.on('change',updateModel)
24
-
25
- }
7
+ Image_.directive('imageField', ['$parse', function ($parse) {
26
8
  return {
27
- templateUrl: template("fields/image/image"),
28
- //getting deprecated
29
- //replace: true,
30
- restrict: "E",
31
- require: '?ngModel', // get a hold of NgModelController
32
- //transclude: true,
33
-
34
- link: link
9
+ restrict: 'A',
10
+ link: function(scope, element, attrs) {
11
+ var model = $parse(attrs.imageField);
12
+ var modelSetter = model.assign;
13
+
14
+ element.bind('change', function(){
15
+ scope.$apply(function(){
16
+ modelSetter(scope, element[0].files[0]);
17
+ });
18
+ });
19
+ }
35
20
  };
36
-
37
21
  }]);
38
22
 
39
-
40
-
41
-
42
- /*-------------
43
- var Image_ = angular.module("DatetimeField", ['flow']);
44
-
45
- /*
46
- * <image-field></image-field>
47
- */
48
- /*---------
49
- Image_.directive('imageField',["gettext", function(gettext){
50
- function link(scope, element, attrs){
51
- var ltr = is_ltr();
52
- scope.element_id = "id_" + scope.field;
53
- scope.msg_element_id = "id_" + scope.field + "_msg";
54
-
55
- scope.fileChanged = function(){
56
- console.log("funckrun");
57
- //if (scope.internal_model){
58
- scope.$watch("model", function(newv, oldv, $scope) {
59
-
60
- f = document.getElementById(scope.element_id).files[0],
61
- r = new FileReader();
62
- r.onloadend = function(e){
63
- console.log("dsfdsffdsfdsfsD");
64
- scope.data = e.target.result;
65
- //image: 'data:image/png;base64,'+btoa($scope.image.data),
66
- };
67
- r.readAsBinaryString(f);
68
- }, true);
69
- };
70
- // Watch event changes
71
-
72
- // TODO: maybe we should pass locals to $eval
73
- /* if (scope.on_change !== undefined) {
74
- scope.$parent.$eval(scope.on_change);
75
- }
76
- scope.debug_ = scope.model;
77
- if (scope.internal_model){
78
- f = document.getElementById(scope.element_id).files[0],
79
- r = new FileReader();
80
- r.onloadend = function(e){
81
- var data = e.target.result;
82
- }
83
- r.readAsBinaryString(f);
84
- }
85
- */
86
- /*------------------
87
-
88
-
89
- }
90
- return {
91
- templateUrl: template("fields/image/image"),
92
- replace: true,
93
- restrict: "E",
94
- transclude: true,
95
- scope: {
96
-
97
- cssClasses: '=cssClass',
98
- // A call back to pass to field ng-change directive
99
- on_change: "@onChange",
100
- // fieldname
101
- field: "=fieldName",
102
- required: "=",
103
- // Actual Angularjs ng-model
104
- model: '=',
105
- // image source
106
- src: '=',
107
-
108
- data: '='
109
-
110
- },
111
- link: link
112
- };
113
-
114
- }]);
115
- */
23
+ //Image_.directive('imageField',["gettext",function(gettext){
24
+ // function link(scope, element, attrs,ngModelController){
25
+ // scope.element_id = "id_" + scope.field;
26
+ // scope.msg_element_id = "id_" + scope.field + "_msg";
27
+ //
28
+ // function updateModel(event){
29
+ // if(event.target && event.target.files){
30
+ // var file = event.target.files[0];
31
+ // var reader = new FileReader();
32
+ // reader.onload = function(e){
33
+ // //scope.image = e.target.result;
34
+ // var URL = window.URL || window.webkitURL;
35
+ //
36
+ // scope.image = URL.createObjectURL(event.target.files);
37
+ // };
38
+ // reader.readAsDataURL(file);
39
+ // }
40
+ // }
41
+ //
42
+ // element.on('change',updateModel)
43
+ //
44
+ // }
45
+ // return {
46
+ // templateUrl: template("fields/image/image"),
47
+ // //getting deprecated
48
+ // //replace: true,
49
+ // restrict: "E",
50
+ // require: '?ngModel', // get a hold of NgModelController
51
+ // //transclude: true,
52
+ //
53
+ // link: link
54
+ // };
55
+ //
56
+ //}]);
@@ -0,0 +1,17 @@
1
+ var upload_service = angular.module("UploadService",[]);
2
+
3
+ upload_service.service('upload_service', ['$http', function ($http) {
4
+ this.uploadFileToUrl = function(file, uploadUrl){
5
+ var fd = new FormData();
6
+ fd.append('file', file);
7
+ $http.post(uploadUrl, fd, {
8
+ transformRequest: angular.identity,
9
+ headers: {'Content-Type': undefined}
10
+ })
11
+ .success(function(){
12
+ })
13
+ .error(function(){
14
+ });
15
+ };
16
+ return this;
17
+ }]);
@@ -10,7 +10,7 @@ window.DModules = [];
10
10
 
11
11
  // This variable will contains all the modules name which should be loaded
12
12
  // as Dashboard application dependency
13
- window.dashboard_dependencies = [];
13
+ window.dashboard_dependencies = window.dashboard_dependencies || [];
14
14
  // Template prefix
15
15
  window.templates_path = "/templates/";
16
16
 
@@ -0,0 +1,4 @@
1
+ angular.module("Dashboard").run(['gettextCatalog', function (gettextCatalog) {
2
+ gettextCatalog.setStrings('fa"', {"Group Name :":"","Permissions :":"","Groups":"","New Group":"","Edit Group":"","Name :":"","Advance Permissions":"","Permissions":"","Save":"","Cansel":"","Users":"","Edit Profile":"","First Name :":"","Last Name :":"","Password :":"","Confirm Password :":"","E-mail :":"","Cancel":"","Group :":"","New User":"","Sent at :":"","Last Update :":"","Conversations":"","Recipient(s):":"","subject :":"","Message :":"","Send":"","Facility Name":"","Number":"","Price?":"","Note":"","Click to pick a date":"","{{ item.title }}":"","Filter":"","Search":"","There is no data!":"","Toggle Select":"","Current Page":"","Total Pages":"","Item(s)":"","Selected":"","Logs":"","Dashboard":"","{{ module.title }}":"","<%= faalis::engine.site_title=\"\" %=\"\"></%=>":"","Some_Slug":"","new":"","Group updated successfully.":"","Group created successfully.":"","Profile updated successfully.":"","New":"","User updated successfully.":"","User created Successfully":"","Inbox":"","Sent box":"","Trash box":"","Message sent successfully.":"","Message sent Successfully":"","Validation error. Fixup errors first.":"","Unkown error: please try again or contact to administrator.":"","Are sure you want to delete":"","item(s)?":""});
3
+
4
+ }]);
@@ -0,0 +1,275 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Content-Type: text/plain; charset=UTF-8\n"
4
+ "Content-Transfer-Encoding: 8bit\n"
5
+ "Language: fa"
6
+
7
+ #: app/views/angularjs_templates/auth/groups/details.html
8
+ msgid "Group Name :"
9
+ msgstr ""
10
+
11
+ #: app/views/angularjs_templates/auth/groups/details.html
12
+ msgid "Permissions :"
13
+ msgstr ""
14
+
15
+ #: app/views/angularjs_templates/auth/groups/index.html
16
+ #: app/views/angularjs_templates/auth/index.html
17
+ #: app/assets/javascripts/faalis/dashboard/modules/auth/auth.js
18
+ msgid "Groups"
19
+ msgstr ""
20
+
21
+ #: app/views/angularjs_templates/auth/groups/new.html
22
+ msgid "New Group"
23
+ msgstr ""
24
+
25
+ #: app/views/angularjs_templates/auth/groups/new.html
26
+ msgid "Edit Group"
27
+ msgstr ""
28
+
29
+ #: app/views/angularjs_templates/auth/groups/new.html
30
+ msgid "Name :"
31
+ msgstr ""
32
+
33
+ #: app/views/angularjs_templates/auth/groups/new.html
34
+ msgid "Advance Permissions"
35
+ msgstr ""
36
+
37
+ #: app/views/angularjs_templates/auth/groups/new.html
38
+ msgid "Permissions"
39
+ msgstr ""
40
+
41
+ #: app/views/angularjs_templates/auth/groups/new.html
42
+ #: app/views/angularjs_templates/auth/profile/edit.html
43
+ #: app/views/angularjs_templates/auth/users/new.html
44
+ msgid "Save"
45
+ msgstr ""
46
+
47
+ #: app/views/angularjs_templates/auth/groups/new.html
48
+ msgid "Cansel"
49
+ msgstr ""
50
+
51
+ #: app/views/angularjs_templates/auth/index.html
52
+ #: app/views/angularjs_templates/auth/users/index.html
53
+ #: app/assets/javascripts/faalis/dashboard/modules/auth/auth.js
54
+ msgid "Users"
55
+ msgstr ""
56
+
57
+ #: app/views/angularjs_templates/auth/profile/edit.html
58
+ msgid "Edit Profile"
59
+ msgstr ""
60
+
61
+ #: app/views/angularjs_templates/auth/profile/edit.html
62
+ #: app/views/angularjs_templates/auth/users/details.html
63
+ #: app/views/angularjs_templates/auth/users/new.html
64
+ msgid "First Name :"
65
+ msgstr ""
66
+
67
+ #: app/views/angularjs_templates/auth/profile/edit.html
68
+ #: app/views/angularjs_templates/auth/users/details.html
69
+ #: app/views/angularjs_templates/auth/users/new.html
70
+ msgid "Last Name :"
71
+ msgstr ""
72
+
73
+ #: app/views/angularjs_templates/auth/profile/edit.html
74
+ #: app/views/angularjs_templates/auth/users/new.html
75
+ msgid "Password :"
76
+ msgstr ""
77
+
78
+ #: app/views/angularjs_templates/auth/profile/edit.html
79
+ msgid "Confirm Password :"
80
+ msgstr ""
81
+
82
+ #: app/views/angularjs_templates/auth/profile/edit.html
83
+ #: app/views/angularjs_templates/auth/users/details.html
84
+ #: app/views/angularjs_templates/auth/users/new.html
85
+ msgid "E-mail :"
86
+ msgstr ""
87
+
88
+ #: app/views/angularjs_templates/auth/profile/edit.html
89
+ #: app/views/angularjs_templates/auth/users/new.html
90
+ #: app/views/angularjs_templates/conversations/new.html
91
+ msgid "Cancel"
92
+ msgstr ""
93
+
94
+ #: app/views/angularjs_templates/auth/users/details.html
95
+ #: app/views/angularjs_templates/auth/users/new.html
96
+ msgid "Group :"
97
+ msgstr ""
98
+
99
+ #: app/views/angularjs_templates/auth/users/new.html
100
+ #: app/views/angularjs_templates/conversations/new.html
101
+ msgid "New User"
102
+ msgstr ""
103
+
104
+ #: app/views/angularjs_templates/conversations/details.html
105
+ #: app/views/angularjs_templates/conversations/show_details.html
106
+ msgid "Sent at :"
107
+ msgstr ""
108
+
109
+ #: app/views/angularjs_templates/conversations/details.html
110
+ #: app/views/angularjs_templates/conversations/show_details.html
111
+ msgid "Last Update :"
112
+ msgstr ""
113
+
114
+ #: app/views/angularjs_templates/conversations/index.html
115
+ #: app/views/angularjs_templates/conversations/show.html
116
+ msgid "Conversations"
117
+ msgstr ""
118
+
119
+ #: app/views/angularjs_templates/conversations/new.html
120
+ msgid "Recipient(s):"
121
+ msgstr ""
122
+
123
+ #: app/views/angularjs_templates/conversations/new.html
124
+ msgid "subject :"
125
+ msgstr ""
126
+
127
+ #: app/views/angularjs_templates/conversations/new.html
128
+ msgid "Message :"
129
+ msgstr ""
130
+
131
+ #: app/views/angularjs_templates/conversations/new.html
132
+ msgid "Send"
133
+ msgstr ""
134
+
135
+ #: app/views/angularjs_templates/fields/control-combo/control-list.html
136
+ msgid "Facility Name"
137
+ msgstr ""
138
+
139
+ #: app/views/angularjs_templates/fields/control-combo/control-list.html
140
+ msgid "Number"
141
+ msgstr ""
142
+
143
+ #: app/views/angularjs_templates/fields/control-combo/control-list.html
144
+ msgid "Price?"
145
+ msgstr ""
146
+
147
+ #: app/views/angularjs_templates/fields/control-combo/control-list.html
148
+ msgid "Note"
149
+ msgstr ""
150
+
151
+ #: app/views/angularjs_templates/fields/datetime/datetime.html
152
+ msgid "Click to pick a date"
153
+ msgstr ""
154
+
155
+ #: app/views/angularjs_templates/fields/string/string.html
156
+ msgid "{{ item.title }}"
157
+ msgstr ""
158
+
159
+ #: app/views/angularjs_templates/filter/index.html
160
+ msgid "Filter"
161
+ msgstr ""
162
+
163
+ #: app/views/angularjs_templates/filter/index.html
164
+ #: app/views/angularjs_templates/list-view/index.html
165
+ msgid "Search"
166
+ msgstr ""
167
+
168
+ #: app/views/angularjs_templates/list-view/index.html
169
+ msgid "There is no data!"
170
+ msgstr ""
171
+
172
+ #: app/views/angularjs_templates/list-view/index.html
173
+ msgid "Toggle Select"
174
+ msgstr ""
175
+
176
+ #: app/views/angularjs_templates/list-view/index.html
177
+ msgid "Current Page"
178
+ msgstr ""
179
+
180
+ #: app/views/angularjs_templates/list-view/index.html
181
+ msgid "Total Pages"
182
+ msgstr ""
183
+
184
+ #: app/views/angularjs_templates/list-view/index.html
185
+ msgid "Item(s)"
186
+ msgstr ""
187
+
188
+ #: app/views/angularjs_templates/list-view/index.html
189
+ msgid "Selected"
190
+ msgstr ""
191
+
192
+ #: app/views/angularjs_templates/logs/index.html
193
+ msgid "Logs"
194
+ msgstr ""
195
+
196
+ #: app/views/angularjs_templates/modules.html
197
+ msgid "Dashboard"
198
+ msgstr ""
199
+
200
+ #: app/views/angularjs_templates/modules.html
201
+ msgid "{{ module.title }}"
202
+ msgstr ""
203
+
204
+ #: app/views/angularjs_templates/modules.html
205
+ msgid "<%= faalis::engine.site_title=\"\" %=\"\"></%=>"
206
+ msgstr ""
207
+
208
+ #: app/views/angularjs_templates/modules.html
209
+ msgid "Some_Slug"
210
+ msgstr ""
211
+
212
+ #: app/assets/javascripts/faalis/dashboard/modules/auth/group.js
213
+ msgid "new"
214
+ msgstr ""
215
+
216
+ #: app/assets/javascripts/faalis/dashboard/modules/auth/group.js
217
+ msgid "Group updated successfully."
218
+ msgstr ""
219
+
220
+ #: app/assets/javascripts/faalis/dashboard/modules/auth/group.js
221
+ msgid "Group created successfully."
222
+ msgstr ""
223
+
224
+ #: app/assets/javascripts/faalis/dashboard/modules/auth/profile.js
225
+ msgid "Profile updated successfully."
226
+ msgstr ""
227
+
228
+ #: app/assets/javascripts/faalis/dashboard/modules/auth/user.js
229
+ #: app/assets/javascripts/faalis/dashboard/modules/conversations.js
230
+ msgid "New"
231
+ msgstr ""
232
+
233
+ #: app/assets/javascripts/faalis/dashboard/modules/auth/user.js
234
+ msgid "User updated successfully."
235
+ msgstr ""
236
+
237
+ #: app/assets/javascripts/faalis/dashboard/modules/auth/user.js
238
+ msgid "User created Successfully"
239
+ msgstr ""
240
+
241
+ #: app/assets/javascripts/faalis/dashboard/modules/conversations.js
242
+ msgid "Inbox"
243
+ msgstr ""
244
+
245
+ #: app/assets/javascripts/faalis/dashboard/modules/conversations.js
246
+ msgid "Sent box"
247
+ msgstr ""
248
+
249
+ #: app/assets/javascripts/faalis/dashboard/modules/conversations.js
250
+ msgid "Trash box"
251
+ msgstr ""
252
+
253
+ #: app/assets/javascripts/faalis/dashboard/modules/conversations.js
254
+ msgid "Message sent successfully."
255
+ msgstr ""
256
+
257
+ #: app/assets/javascripts/faalis/dashboard/modules/conversations.js
258
+ msgid "Message sent Successfully"
259
+ msgstr ""
260
+
261
+ #: app/assets/javascripts/faalis/dashboard/modules/errors.js
262
+ msgid "Validation error. Fixup errors first."
263
+ msgstr ""
264
+
265
+ #: app/assets/javascripts/faalis/dashboard/modules/errors.js
266
+ msgid "Unkown error: please try again or contact to administrator."
267
+ msgstr ""
268
+
269
+ #: app/assets/javascripts/faalis/dashboard/modules/list-view.js
270
+ msgid "Are sure you want to delete"
271
+ msgstr ""
272
+
273
+ #: app/assets/javascripts/faalis/dashboard/modules/list-view.js
274
+ msgid "item(s)?"
275
+ msgstr ""