erp_app 3.1.5 → 3.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/erp_app/desktop/job_tracker/base_controller.rb +6 -1
- data/app/controllers/erp_app/mobile/user_management/base_controller.rb +0 -3
- data/app/models/application.rb +1 -1
- data/app/views/erp_app/desktop/base/index.erb +11 -6
- data/app/views/erp_app/mobile/base/index.erb +37 -32
- data/app/views/erp_app/mobile/login/index.erb +1 -2
- data/app/views/erp_app/organizer/base/index.erb +6 -0
- data/db/data_migrations/20120411180756_create_user_management_mobile_application.rb +5 -7
- data/db/data_migrations/20130411200351_add_job_tracker_mobile_app.rb +16 -0
- data/db/migrate/20120920145259_add_job_tracker.rb +11 -7
- data/db/migrate/20130410182333_update_mobile_application.rb +27 -0
- data/lib/erp_app/version.rb +1 -1
- data/lib/generators/compass_ae_mobile/compass_ae_mobile_generator.rb +5 -2
- data/lib/generators/mobile_application/mobile_application_generator.rb +0 -2
- data/lib/generators/mobile_application/templates/controllers/controller_template.erb +1 -1
- data/lib/generators/mobile_application/templates/migrate/migration_template.erb +2 -2
- data/lib/generators/mobile_application/templates/public/app.js.erb +23 -34
- data/public/images/erp_app/mobile/green_light.png +0 -0
- data/public/images/erp_app/mobile/red_light.png +0 -0
- data/public/images/erp_app/mobile/yellow_light.png +0 -0
- data/public/javascripts/erp_app/desktop/applications/job_tracker/jobs_grid.js +2 -2
- data/public/javascripts/erp_app/login/mobile.js +55 -48
- data/public/javascripts/erp_app/mobile/app.js +71 -43
- data/public/javascripts/erp_app/mobile/applications/job_tracker/app.js +177 -0
- data/public/javascripts/erp_app/mobile/applications/job_tracker/model/job.js +15 -0
- data/public/javascripts/erp_app/mobile/applications/job_tracker/store/jobs.js +16 -0
- data/public/javascripts/erp_app/mobile/applications/job_tracker/store/view/templates.js +22 -0
- data/public/javascripts/erp_app/mobile/applications/user_management/app.js +103 -159
- data/public/javascripts/erp_app/mobile/applications/user_management/app/view/templates.js +32 -22
- data/public/stylesheets/erp_app/mobile/applications/user_management/main.css +20 -4
- data/public/stylesheets/erp_app/mobile/mobile.css +35 -324
- data/public/stylesheets/erp_app/shared/compass-ext-all.css +5 -11
- data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +15 -0
- data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +12 -0
- data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +19 -0
- data/spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb +252 -0
- data/spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb +53 -0
- data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +16 -0
- data/spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb +21 -0
- data/spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb +32 -0
- data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +12 -0
- data/spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb +23 -0
- data/spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb +42 -0
- data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +22 -0
- data/spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb +29 -0
- data/spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb +11 -0
- data/spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb +19 -0
- data/spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb +23 -0
- data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +20 -0
- data/spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb +16 -0
- data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +24 -0
- data/spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb +23 -0
- data/spec/dummy/db/data_migrations/20130422153811_upgrade_compass_ae_instances_data.erp_base_erp_svcs.rb +19 -0
- data/spec/dummy/db/data_migrations/20130422153812_add_guid_to_instances.erp_base_erp_svcs.rb +10 -0
- data/spec/dummy/db/data_migrations/20130422153813_create_job_tracker_desktop_application.erp_app.rb +23 -0
- data/spec/dummy/db/data_migrations/20130422153814_created_tracked_jobs.erp_app.rb +15 -0
- data/spec/dummy/db/data_migrations/20130422153815_add_job_tracker_mobile_app.erp_app.rb +17 -0
- data/spec/dummy/db/migrate/20130105135833_base_erp_services.erp_base_erp_svcs.rb +461 -0
- data/spec/dummy/db/migrate/20130105135834_base_tech_services.erp_tech_svcs.rb +271 -0
- data/spec/dummy/db/migrate/20130105135835_create_has_attribute_tables.erp_tech_svcs.rb +39 -0
- data/spec/dummy/db/migrate/20130105135836_create_groups.erp_tech_svcs.rb +19 -0
- data/spec/dummy/db/migrate/20130105135837_upgrade_security.erp_tech_svcs.rb +54 -0
- data/spec/dummy/db/migrate/20130105135838_upgrade_security2.erp_tech_svcs.rb +270 -0
- data/spec/dummy/db/migrate/20130105135839_base_app_framework.erp_app.rb +276 -0
- data/spec/dummy/db/migrate/20130422153805_add_txn_status.erp_base_erp_svcs.rb +37 -0
- data/spec/dummy/db/migrate/20130422153806_upgrade_compass_ae_instances.erp_base_erp_svcs.rb +34 -0
- data/spec/dummy/db/migrate/20130422153807_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb +17 -0
- data/spec/dummy/db/migrate/20130422153808_add_long_lat_to_address.erp_base_erp_svcs.rb +16 -0
- data/spec/dummy/db/migrate/20130422153809_add_queue_to_delayed_jobs.erp_tech_svcs.rb +14 -0
- data/spec/dummy/db/migrate/20130422153810_add_job_tracker.erp_app.rb +20 -0
- data/spec/dummy/db/migrate/20130422153811_update_mobile_application.erp_app.rb +28 -0
- data/spec/dummy/db/schema.rb +883 -0
- data/spec/dummy/db/spec.sqlite3 +0 -0
- data/spec/dummy/log/adam.log +1 -0
- data/spec/dummy/log/spec.log +107402 -0
- metadata +98 -46
- data/app/views/erp_app/mobile/user_management/base/index.html.erb +0 -28
- data/lib/generators/mobile_application/templates/INSTALL +0 -25
- data/lib/generators/mobile_application/templates/views/index.html.erb +0 -28
- data/public/images/icons/add/Thumbs.db +0 -0
- data/public/images/icons/calendar/Thumbs.db +0 -0
- data/public/images/icons/copy/Thumbs.db +0 -0
- data/public/images/icons/cut/Thumbs.db +0 -0
- data/public/images/icons/delete/Thumbs.db +0 -0
- data/public/images/icons/edit/Thumbs.db +0 -0
- data/public/images/icons/folder/Thumbs.db +0 -0
- data/public/images/icons/gear/Thumbs.db +0 -0
- data/public/images/icons/globe/Thumbs.db +0 -0
- data/public/images/icons/grid/Thumbs.db +0 -0
- data/public/images/icons/help/Thumbs.db +0 -0
- data/public/images/icons/information/Thumbs.db +0 -0
- data/public/images/icons/key/Thumbs.db +0 -0
- data/public/images/icons/log_out/Thumbs.db +0 -0
- data/public/images/icons/mail/Thumbs.db +0 -0
- data/public/images/icons/new/Thumbs.db +0 -0
- data/public/images/icons/next/Thumbs.db +0 -0
- data/public/images/icons/open/Thumbs.db +0 -0
- data/public/images/icons/paste/Thumbs.db +0 -0
- data/public/images/icons/picture/Thumbs.db +0 -0
- data/public/images/icons/presentation/Thumbs.db +0 -0
- data/public/images/icons/preview/Thumbs.db +0 -0
- data/public/images/icons/previous/Thumbs.db +0 -0
- data/public/images/icons/print/Thumbs.db +0 -0
- data/public/images/icons/properties/Thumbs.db +0 -0
- data/public/images/icons/redo/Thumbs.db +0 -0
- data/public/images/icons/refresh/Thumbs.db +0 -0
- data/public/images/icons/remove/Thumbs.db +0 -0
- data/public/images/icons/rename/Thumbs.db +0 -0
- data/public/images/icons/save/Thumbs.db +0 -0
- data/public/images/icons/search/Thumbs.db +0 -0
- data/public/images/icons/send/Thumbs.db +0 -0
- data/public/images/icons/settings/Thumbs.db +0 -0
- data/public/images/icons/synchronize/Thumbs.db +0 -0
- data/public/images/icons/undo/Thumbs.db +0 -0
- data/public/images/icons/upload/Thumbs.db +0 -0
- data/public/images/icons/user/Thumbs.db +0 -0
- data/public/images/icons/zoom_in/Thumbs.db +0 -0
- data/public/images/icons/zoom_out/Thumbs.db +0 -0
- data/public/javascripts/erp_app/ckeditor/plugins/jwplayer/jwplayer/Thumbs.db +0 -0
@@ -15,7 +15,12 @@ module ErpApp
|
|
15
15
|
|
16
16
|
render :json => {:total_count => total_count, :success => true,
|
17
17
|
:jobs => job_trackers.collect { |tracker| tracker.to_hash(
|
18
|
-
:only => [:id, :job_name, :
|
18
|
+
:only => [:id, :job_name, :job_klass, :run_time],
|
19
|
+
:additional_values => {
|
20
|
+
:scheduled => (tracker.scheduled?),
|
21
|
+
:last_run_at => (tracker.last_run_at.nil? ? '' : tracker.last_run_at.strftime("%m-%d-%Y %H:%M:%S")),
|
22
|
+
:next_run_at => (tracker.next_run_at.nil? ? '' : tracker.next_run_at.strftime("%m-%d-%Y %H:%M:%S")),
|
23
|
+
}) }}
|
19
24
|
end
|
20
25
|
|
21
26
|
def schedule
|
data/app/models/application.rb
CHANGED
@@ -6,7 +6,7 @@ class Application < ActiveRecord::Base
|
|
6
6
|
has_and_belongs_to_many :app_containers
|
7
7
|
has_and_belongs_to_many :widgets
|
8
8
|
|
9
|
-
validates_uniqueness_of :javascript_class_name
|
9
|
+
validates_uniqueness_of :javascript_class_name, :allow_nil => true
|
10
10
|
validates_uniqueness_of :internal_identifier, :scope => :type, :case_sensitive => false
|
11
11
|
|
12
12
|
def locate_resources(resource_type)
|
@@ -56,10 +56,10 @@
|
|
56
56
|
<!--javascript-->
|
57
57
|
<%= include_extjs(:theme => @desktop.get_preference(:extjs_theme), :debug => (Rails.env != 'production')) %>
|
58
58
|
<%= static_javascript_include_tag("extjs/overrides.js")%>
|
59
|
-
|
59
|
+
|
60
60
|
<%= static_javascript_include_tag("erp_app/utility.js")%>
|
61
61
|
<%= static_javascript_include_tag("erp_app/desktop/ext_ux_desktop_module.js")%>
|
62
|
-
|
62
|
+
|
63
63
|
<%= static_javascript_include_tag('erp_app/widgets.js')%>
|
64
64
|
<%= include_widgets%>
|
65
65
|
<!-- shared application resources -->
|
@@ -90,7 +90,7 @@
|
|
90
90
|
<!-- end application resources -->
|
91
91
|
<!-- compass extensions -->
|
92
92
|
<%=include_code_mirror_library%>
|
93
|
-
<style type="text/css">
|
93
|
+
<style type="text/css">
|
94
94
|
.CodeMirror {
|
95
95
|
border: 1px solid #eee;
|
96
96
|
}
|
@@ -155,7 +155,7 @@
|
|
155
155
|
iconCls:"icon-key",
|
156
156
|
handler:b.onLogout,
|
157
157
|
scope:b
|
158
|
-
},
|
158
|
+
},
|
159
159
|
{
|
160
160
|
text:"About",
|
161
161
|
iconCls:"icon-info",
|
@@ -199,7 +199,7 @@
|
|
199
199
|
"<tr><td>{name}</td><td>{version}</td></tr>",
|
200
200
|
'</tpl>',
|
201
201
|
"</table>");
|
202
|
-
|
202
|
+
|
203
203
|
var aboutWindow = Ext.create('Ext.window.Window',{
|
204
204
|
title: 'About Your Compass AE Instance',
|
205
205
|
height: 200,
|
@@ -221,7 +221,7 @@
|
|
221
221
|
var compassDesktop;
|
222
222
|
Ext.onReady(function () {
|
223
223
|
compassDesktop = new MyDesktop.App();
|
224
|
-
|
224
|
+
|
225
225
|
setTimeout(function(){
|
226
226
|
Ext.get('loading').remove();
|
227
227
|
Ext.get('loading-mask').fadeOut({remove:true});
|
@@ -231,6 +231,11 @@
|
|
231
231
|
}, 250);
|
232
232
|
});
|
233
233
|
|
234
|
+
window.onbeforeunload = function(){
|
235
|
+
return ' If you navigate away from this page without' +
|
236
|
+
' first saving your data, the changes will be' +
|
237
|
+
' lost.';
|
238
|
+
}
|
234
239
|
</script>
|
235
240
|
<div id="loading-mask"></div>
|
236
241
|
<div id="loading">
|
@@ -1,38 +1,43 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
<head>
|
4
|
+
<title>CompassAE Mobile</title>
|
5
|
+
<%= include_sencha_touch :debug => (Rails.env != 'production') %>
|
6
|
+
<%= static_javascript_include_tag('erp_app/utility.js') %>
|
7
|
+
<%= static_javascript_include_tag('erp_app/mobile/mobile_base.js') %>
|
8
|
+
<%= create_authenticity_token_sencha_touch_field %>
|
9
|
+
<%= add_authenticity_token_to_extjs %>
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
<!--stylesheets-->
|
12
|
+
<%= static_stylesheet_link_tag('erp_app/mobile/mobile.css') %>
|
13
|
+
<!--end stylesheets-->
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
%>
|
20
|
-
mobileApplications.push({
|
21
|
-
text:'<%=application.description%>',
|
22
|
-
iconCls:'<%=application.icon%>',
|
23
|
-
ui:'round',
|
24
|
-
handler:function(){
|
25
|
-
window.location = '<%=application.base_url%>'
|
26
|
-
}
|
27
|
-
});
|
28
|
-
<%
|
29
|
-
end
|
30
|
-
%>
|
31
|
-
</script>
|
15
|
+
<% @mobile.applications.each do |application| %>
|
16
|
+
<%= static_javascript_include_tag(application.locate_resources('javascripts')) %>
|
17
|
+
<%= static_stylesheet_link_tag(application.locate_resources('stylesheets')) %>
|
18
|
+
<% end %>
|
32
19
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
20
|
+
<script type="text/javascript">
|
21
|
+
var mobileApplications = [], mobileApplicationsData = [];
|
22
|
+
<%
|
23
|
+
@mobile.applications.each do |application|
|
24
|
+
%>
|
25
|
+
|
26
|
+
mobileApplications.push({xtype: '<%=application.xtype%>', itemId: '<%=application.internal_identifier%>'});
|
27
|
+
mobileApplicationsData.push({
|
28
|
+
iconCls: '<%=application.icon%>',
|
29
|
+
name: '<%=application.description%>',
|
30
|
+
itemId: '#<%=application.internal_identifier%>'
|
31
|
+
});
|
32
|
+
|
33
|
+
<%
|
34
|
+
end
|
35
|
+
%>
|
36
|
+
</script>
|
37
|
+
|
38
|
+
<%= static_javascript_include_tag("erp_app/mobile/app.js") %>
|
39
|
+
</head>
|
40
|
+
<body>
|
41
|
+
<%= setSessionTimeout %>
|
42
|
+
</body>
|
38
43
|
</html>
|
@@ -2,10 +2,9 @@
|
|
2
2
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
3
|
<head>
|
4
4
|
<title>CompassAE Mobile</title>
|
5
|
-
<%=include_sencha_touch :debug =>
|
5
|
+
<%=include_sencha_touch :debug => (Rails.env != 'production') %>
|
6
6
|
<%=static_javascript_include_tag('erp_app/utility.js')%>
|
7
7
|
<%=static_javascript_include_tag('erp_app/mobile/mobile_base.js')%>
|
8
|
-
<%#=setup_js_authentication(@user, @desktop)%>
|
9
8
|
<script type="text/javascript">
|
10
9
|
Compass.ErpApp.Mobile.AuthentictyToken = '<%=form_authenticity_token%>';
|
11
10
|
Compass.ErpApp.Mobile.LoginTo = '/erp_app/mobile/'
|
@@ -40,6 +40,12 @@
|
|
40
40
|
organizerLayout.setupLogoutButton();
|
41
41
|
organizerLayout.setup();
|
42
42
|
});
|
43
|
+
|
44
|
+
window.onbeforeunload = function(){
|
45
|
+
return ' If you navigate away from this page without' +
|
46
|
+
' first saving your data, the changes will be' +
|
47
|
+
' lost.';
|
48
|
+
}
|
43
49
|
</script>
|
44
50
|
<%= setSessionTimeout %>
|
45
51
|
</body>
|
@@ -1,14 +1,12 @@
|
|
1
1
|
class CreateUserManagementMobileApplication
|
2
2
|
|
3
3
|
def self.up
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
MobileApplication.create(
|
5
|
+
:description => 'User Management',
|
6
|
+
:icon => 'icon-user',
|
7
|
+
:internal_identifier => 'user_management',
|
8
|
+
:xtype => 'compass-erpapp-mobile-usermanagement-application'
|
9
9
|
)
|
10
|
-
|
11
|
-
app.save
|
12
10
|
end
|
13
11
|
|
14
12
|
def self.down
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class AddJobTrackerMobileApp
|
2
|
+
|
3
|
+
def self.up
|
4
|
+
MobileApplication.create(
|
5
|
+
:description => 'Jobs',
|
6
|
+
:icon => 'icon-tasks',
|
7
|
+
:internal_identifier => 'job_tracker',
|
8
|
+
:xtype => 'compass-erpapp-mobile-jobtracker-application'
|
9
|
+
)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
MobileApplication.destroy_all("internal_identifier = 'job_tracker'")
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -1,15 +1,19 @@
|
|
1
1
|
class AddJobTracker < ActiveRecord::Migration
|
2
2
|
def up
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
unless table_exists?(:job_trackers)
|
4
|
+
create_table :job_trackers do |t|
|
5
|
+
t.string :job_name
|
6
|
+
t.string :job_klass
|
7
|
+
t.string :run_time
|
8
|
+
t.datetime :last_run_at
|
9
|
+
t.datetime :next_run_at
|
10
|
+
end
|
9
11
|
end
|
10
12
|
end
|
11
13
|
|
12
14
|
def down
|
13
|
-
|
15
|
+
if table_exists?(:job_trackers)
|
16
|
+
drop_table :job_trackers
|
17
|
+
end
|
14
18
|
end
|
15
19
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class UpdateMobileApplication < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
unless columns(:applications).collect { |c| c.name }.include?('xtype')
|
4
|
+
rename_column :applications, :base_url, :xtype
|
5
|
+
|
6
|
+
user_management = MobileApplication.find_by_internal_identifier('user_management')
|
7
|
+
if user_management.nil?
|
8
|
+
MobileApplication.create(
|
9
|
+
:description => 'User Mgmt',
|
10
|
+
:icon => 'icon-user',
|
11
|
+
:internal_identifier => 'user_management',
|
12
|
+
:xtype => 'compass-erpapp-mobile-usermanagement-application'
|
13
|
+
)
|
14
|
+
else
|
15
|
+
user_management.description = 'User Mgmt'
|
16
|
+
user_management.xtype = 'compass-erpapp-mobile-usermanagement-application'
|
17
|
+
user_management.save
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def down
|
23
|
+
if columns(:applications).collect { |c| c.name }.include?('xtype')
|
24
|
+
rename_column :applications, :xtype, :base_url
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/erp_app/version.rb
CHANGED
@@ -10,14 +10,17 @@ class CompassAeMobileGenerator < Rails::Generators::NamedBase
|
|
10
10
|
run "sencha -sdk #{@sdk_path} generate app #{class_name} #{application_path}"
|
11
11
|
|
12
12
|
%w{app.json build.xml index.html packager.json resources}.each do |file|
|
13
|
-
remove_file
|
13
|
+
remove_file File.join(application_path, file)
|
14
14
|
end
|
15
15
|
|
16
16
|
gsub_file File.join(application_path, 'app.js'), %r[^//<debug>([\s\S])+//</debug>], "Ext.Loader.setPath({'#{class_name}': 'javascripts/#{class_name}/app'});"
|
17
17
|
|
18
18
|
#replace Main.js
|
19
|
-
remove_file
|
19
|
+
remove_file File.join(application_path, 'app', 'view', 'Main.js')
|
20
20
|
template "javascripts/main_template.erb", File.join(application_path, 'app', 'view', 'Main.js')
|
21
|
+
|
22
|
+
#remove touch library
|
23
|
+
remove_file File.join(application_path, 'touch')
|
21
24
|
end
|
22
25
|
|
23
26
|
def generate_compass_ae_files
|
@@ -9,8 +9,6 @@ class MobileApplicationGenerator < Rails::Generators::NamedBase
|
|
9
9
|
|
10
10
|
#make javascript
|
11
11
|
template "public/app.js.erb", "public/javascripts/erp_app/mobile/applications/#{file_name}/app.js"
|
12
|
-
|
13
|
-
copy_file "views/index.html.erb", "app/views/erp_app/mobile/#{file_name}/base/index.html.erb"
|
14
12
|
|
15
13
|
#make css folder
|
16
14
|
empty_directory "public/stylesheets/erp_app/mobile/applications/#{file_name}"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class Create<%=class_name %>MobileApplication
|
2
2
|
def self.up
|
3
|
-
|
3
|
+
MobileApplication.create(
|
4
4
|
:description => '<%=description %>',
|
5
5
|
:icon => '<%=icon %>',
|
6
6
|
:internal_identifier => '<%=file_name %>',
|
7
|
-
:
|
7
|
+
:xtype => 'compass-erpapp-mobile-<%= file_name %>-application'
|
8
8
|
)
|
9
9
|
end
|
10
10
|
|
@@ -1,35 +1,24 @@
|
|
1
|
-
Ext.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
launch: function () {
|
7
|
-
Ext.create("Ext.Container", {
|
8
|
-
fullscreen: true,
|
9
|
-
html:'Your New Mobile Application',
|
10
|
-
items: [
|
11
|
-
{
|
12
|
-
xtype:'toolbar',
|
13
|
-
ui:'light',
|
14
|
-
docked:'top',
|
1
|
+
Ext.define('Compass.ErpApp.Mobile.<%= class_name %>.Application', {
|
2
|
+
extend: 'Ext.Panel',
|
3
|
+
xtype: 'compass-erpapp-mobile-<%= file_name %>-application',
|
4
|
+
config:{
|
5
|
+
tabBarPosition: 'bottom',
|
15
6
|
items:[
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
]
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
}
|
35
|
-
});
|
7
|
+
{
|
8
|
+
xtype: 'toolbar',
|
9
|
+
ui: 'light',
|
10
|
+
docked: 'top',
|
11
|
+
items: [
|
12
|
+
{
|
13
|
+
text: 'Home',
|
14
|
+
ui: 'back',
|
15
|
+
handler: function (btn) {
|
16
|
+
btn.up('#mainContainer').setActiveItem('#home');
|
17
|
+
}
|
18
|
+
}
|
19
|
+
]
|
20
|
+
}
|
21
|
+
],
|
22
|
+
html:'Hello World'
|
23
|
+
}
|
24
|
+
});
|
Binary file
|
Binary file
|
Binary file
|
@@ -5,8 +5,8 @@ Ext.define('Compass.ErpApp.Desktop.Applications.JobTracker.Model', {
|
|
5
5
|
{name: 'job_name', type: 'string'},
|
6
6
|
{name: 'run_time', type: 'string'},
|
7
7
|
{name: 'scheduled', type: 'boolean'},
|
8
|
-
{name: 'last_run_at', type: 'date', dateFormat: '
|
9
|
-
{name: 'next_run_at', type: 'date', dateFormat: '
|
8
|
+
{name: 'last_run_at', type: 'date', dateFormat: 'm-d-Y H:i:s'},
|
9
|
+
{name: 'next_run_at', type: 'date', dateFormat: 'm-d-Y H:i:s'}
|
10
10
|
]
|
11
11
|
});
|
12
12
|
|
@@ -1,52 +1,59 @@
|
|
1
1
|
Ext.application({
|
2
|
-
|
3
|
-
|
2
|
+
name: 'compass_ae_mobile_login',
|
3
|
+
useLoadMask: true,
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
},
|
11
|
-
items: [
|
12
|
-
{
|
13
|
-
label:'Username or Email Address',
|
14
|
-
name:'login',
|
15
|
-
required:true
|
16
|
-
},
|
17
|
-
{
|
18
|
-
xtype:'passwordfield',
|
19
|
-
label:'Password',
|
20
|
-
name:'password',
|
21
|
-
required:true
|
22
|
-
},
|
23
|
-
{
|
24
|
-
xtype:'button',
|
25
|
-
text:'Login',
|
26
|
-
flex:1,
|
27
|
-
scope:this,
|
28
|
-
ui:'confirm-round',
|
29
|
-
style:'margin:0.1em',
|
30
|
-
handler:function(btn){
|
31
|
-
var form = btn.up('formpanel');
|
32
|
-
form.setMasked({
|
33
|
-
xtype:'loadmask',
|
34
|
-
message:'Authenticating User...'
|
35
|
-
});
|
36
|
-
form.submit({
|
37
|
-
url:'/session/sign_in',
|
38
|
-
method:'POST',
|
39
|
-
success:function(form, result){
|
40
|
-
form.setMasked(false);
|
41
|
-
window.location = Compass.ErpApp.Mobile.LoginTo;
|
5
|
+
launch: function () {
|
6
|
+
Ext.create("Ext.form.Panel", {
|
7
|
+
fullscreen: true,
|
8
|
+
defaults: {
|
9
|
+
xtype: 'textfield'
|
42
10
|
},
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
11
|
+
items: [
|
12
|
+
{
|
13
|
+
xtype:'container',
|
14
|
+
height:200,
|
15
|
+
cls: 'login-logo'
|
16
|
+
},
|
17
|
+
{
|
18
|
+
label: 'Username or Email Address',
|
19
|
+
labelAlign: 'top',
|
20
|
+
name: 'login',
|
21
|
+
required: true
|
22
|
+
},
|
23
|
+
{
|
24
|
+
xtype: 'passwordfield',
|
25
|
+
labelAlign: 'top',
|
26
|
+
label: 'Password',
|
27
|
+
name: 'password',
|
28
|
+
required: true
|
29
|
+
},
|
30
|
+
{
|
31
|
+
xtype: 'button',
|
32
|
+
text: 'Login',
|
33
|
+
flex: 1,
|
34
|
+
scope: this,
|
35
|
+
ui: 'confirm-round',
|
36
|
+
style: 'margin:0.1em',
|
37
|
+
handler: function (btn) {
|
38
|
+
var form = btn.up('formpanel');
|
39
|
+
form.setMasked({
|
40
|
+
xtype: 'loadmask',
|
41
|
+
message: 'Authenticating User...'
|
42
|
+
});
|
43
|
+
form.submit({
|
44
|
+
url: '/session/sign_in',
|
45
|
+
method: 'POST',
|
46
|
+
success: function (form, result) {
|
47
|
+
form.setMasked(false);
|
48
|
+
window.location = Compass.ErpApp.Mobile.LoginTo;
|
49
|
+
},
|
50
|
+
failure: function (form, result) {
|
51
|
+
Ext.Msg.alert("Error", "Could not authenticate .");
|
52
|
+
}
|
53
|
+
});
|
54
|
+
}
|
55
|
+
}
|
56
|
+
]
|
57
|
+
});
|
58
|
+
}
|
52
59
|
});
|