Skip to content

Commit

Permalink
Merge pull request #354 from Saleslogix/topic-remove-ts
Browse files Browse the repository at this point in the history
Reverting back to js to prepare for ES6 instead of TypeScript.
  • Loading branch information
jbest84 committed Jul 21, 2015
2 parents 2d817e5 + 9167a74 commit 044fe74
Show file tree
Hide file tree
Showing 249 changed files with 7,620 additions and 4,642 deletions.
6 changes: 1 addition & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ module.exports = function(grunt) {
grunt.loadTasks('grunt-tasks');

// Register alias tasks
grunt.registerTask('ts', ['shell:typescript']);
grunt.registerTask('tsc', ['shell:typescript']);
grunt.registerTask('typescript', ['shell:typescript']);
grunt.registerTask('test', ['typescript', 'connect', 'jasmine:coverage']);
grunt.registerTask('test', ['connect', 'jasmine:coverage']);
grunt.registerTask('server', ['connect:server:keepalive']);
grunt.registerTask('bundle', ['shell:bundle:<%= pkg.version %>']);
grunt.registerTask('default', ['test']);
};

28 changes: 0 additions & 28 deletions all.sln

This file was deleted.

388 changes: 0 additions & 388 deletions argos-saleslogix.csproj

This file was deleted.

6 changes: 3 additions & 3 deletions build/rename.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
FILES=`find src -name '*.js'`
FILES=`find src -name '*.ts'`
for f in $FILES
do
mv $f ${f/\.js/\.ts}
done
mv $f ${f/\.ts/\.js}
done
46 changes: 0 additions & 46 deletions declarations/crm.d.ts

This file was deleted.

10 changes: 1 addition & 9 deletions grunt-tasks/grunt-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function(grunt) {
if (os.platform() !== 'win32') {
throw new Error('The bundle command is not available on non-windows platforms.');
}

var cmd = 'build\\bundle';
if (version) {
return [cmd, ' ', version].join('');
Expand All @@ -31,14 +31,6 @@ module.exports = function(grunt) {
cwd: ''
}
}
},
typescript: {
command: 'node node_modules/typescript/bin/tsc',
options: {
execOptions: {
cwd: '.'
}
}
}
});

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"grunt-shell": "^1.1.2",
"grunt-template-jasmine-istanbul": "^0.3.3",
"grunt-weinre": "0.0.3",
"hapi": "^8.8.0",
"typescript": "^1.5.0-beta"
"hapi": "^8.8.0"
}
}
2 changes: 1 addition & 1 deletion scripts/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"port": 8000,
"proxy": {
"host": "localhost",
"host": "192.168.116.128",
"port": 80,
"protocol": "http"
}
Expand Down
69 changes: 45 additions & 24 deletions src-out/Action.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) 1997-2013, SalesLogix, NA., LLC. All rights reserved.
*/

/**
* @class crm.Action
*
Expand All @@ -12,34 +13,40 @@ define('crm/Action', [
'dojo/_base/lang',
'dojo/string',
'argos/Utility'
], function (lang, string, utility) {
], function(
lang,
string,
utility
) {
var __class = lang.setObject('crm.Action', {
calledText: 'Called ${0}',
emailedText: 'E-mailed ${0}',
navigateToHistoryInsert: function (entry, complete) {

navigateToHistoryInsert: function(entry, complete) {
var view = App.getView('history_edit');
if (view) {
view.show({
title: entry['Title'] || null,
template: {},
entry: entry,
insert: true
}, {
complete: complete
});
title: entry['Title'] || null,
template: {},
entry: entry,
insert: true
}, {
complete: complete
});
}
},
recordToHistory: function (complete, o) {
recordToHistory: function(complete, o) {
var entry = {
'UserId': App.context && App.context.user['$key'],
'UserName': App.context && App.context.user['$descriptor'],
'Duration': 15,
'CompletedDate': (new Date())
};
lang.mixin(entry, o);

this.navigateToHistoryInsert(entry, complete);
},
callPhone: function (action, selection, phoneProperty) {
callPhone: function(action, selection, phoneProperty) {
var value;
if (!selection || !selection.data) {
return;
Expand All @@ -49,16 +56,17 @@ define('crm/Action', [
descriptor: selection.data['$descriptor'],
key: selection.data['$key']
});

lang.mixin(selection.data, {
'Type': 'atPhoneCall',
'Description': string.substitute(crm.Action.calledText, [selection.data['$descriptor']])
});
value = utility.getValue(selection.data, phoneProperty, '');
crm.Action.recordToHistory(function () {
crm.Action.recordToHistory(function() {
App.initiateCall(value);
}.bindDelegate(this), selection.data);
},
sendEmail: function (action, selection, emailProperty) {
sendEmail: function(action, selection, emailProperty) {
var value;
if (!selection || !selection.data) {
return;
Expand All @@ -68,55 +76,68 @@ define('crm/Action', [
'Description': string.substitute(crm.Action.emailedText, [selection.data['$descriptor']])
});
value = utility.getValue(selection.data, emailProperty, '');
crm.Action.recordToHistory(function () {
crm.Action.recordToHistory(function() {
App.initiateEmail(value);
}.bindDelegate(this), selection.data);
},
addNote: function (action, selection) {
var entry = selection.data, key = selection.data.$key, view, desc = selection.data.$descriptor;

addNote: function(action, selection) {
var entry = selection.data,
key = selection.data.$key,
view,
desc = selection.data.$descriptor;

this.setSource({
entry: entry,
descriptor: desc,
key: key
});

view = App.getView('history_edit');

if (view) {
view.show({ insert: true });
view.show({insert: true});
}
},
addActivity: function (action, selection) {
addActivity: function(action, selection) {
this.setSource({
entry: selection.data,
descriptor: selection.data['$descriptor'],
key: selection.data['$key']
});
App.navigateToActivityInsertView();
},
navigateToEntity: function (action, selection, o) {
navigateToEntity: function(action, selection, o) {
var options = {
key: utility.getValue(selection.data, o.keyProperty),
descriptor: utility.getValue(selection.data, o.textProperty)
}, view = App.getView(o.view);
key: utility.getValue(selection.data, o.keyProperty),
descriptor: utility.getValue(selection.data, o.textProperty)
},
view = App.getView(o.view);

if (view && options.key) {
view.show(options);
}
},
hasProperty: function (action, selection, property) {

hasProperty: function(action, selection, property) {
return utility.getValue(selection.data, property);
},
addAttachment: function (action, selection) {
addAttachment: function(action, selection) {
var view;
this.setSource({
entry: selection.data,
descriptor: selection.data['$descriptor'],
key: selection.data['$key']
});
view = App.getView('attachment_Add');

if (view) {
view.show({ insert: true });
}
}
});

lang.setObject('Mobile.SalesLogix.Action', __class);
return __class;
});

Loading

0 comments on commit 044fe74

Please sign in to comment.