diff --git a/Gruntfile.js b/Gruntfile.js index 8bf3825f..45be0712 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -38,9 +38,9 @@ module.exports = function (grunt) { compile: { options: { baseUrl: '<%= source_folder %>', - 'paths': { - // 'tf': '.', - 'sortabletable': 'extensions/sortabletable' + paths: { + 'sortabletable': 'extensions/sortabletable', + 'adapterSortabletable': 'extensions/sortabletable/adapterSortabletable' }, // include: ['../libs/almond/almond', 'tablefilter'], // exclude: [ @@ -60,30 +60,32 @@ module.exports = function (grunt) { } }, modules:[ + { + name: 'extensions/sortabletable/adapterSortabletable', + include: [ + 'extensions/sortabletable/adapterSortabletable' + ] + }, { name: 'tablefilter', - //out: '<%= dist_folder %>tablefilter.js', create: true, include: [ '../libs/almond/almond', 'tablefilter' ], - exclude: [ - 'extensions/sortabletable/sortabletable', + excludeShallow: [ 'extensions/sortabletable/adapterSortabletable' ] + // , + // exclude: [ + // 'extensions/sortabletable/sortabletable', + // 'extensions/sortabletable/adapterSortabletable' + // ] } - // { - // name: 'extensions/sortabletable/adapterSortabletable', - // include: [ - // 'extensions/sortabletable/sortabletable' - // ] - // } ], removeCombined: true, - findNestedDependencies: true - /*, - optimize: 'uglify2', + findNestedDependencies: false, + optimize: 'none'/*'uglify2', preserveLicenseComments: false, generateSourceMaps: true*/ } @@ -118,8 +120,10 @@ module.exports = function (grunt) { }, js: { - src: ['<%= dist_folder %>tablefilter.js'], - dest: '<%= dist_folder %>tablefilter.js' + files: [{ + src: ['<%= dist_folder %>tablefilter.js'], + dest: '<%= dist_folder %>tablefilter.js' + }] } }, @@ -139,9 +143,10 @@ module.exports = function (grunt) { }, copy: { - main: { + tablefilter: { files: [ - { src: 'libs/sortabletable.js', dest: '<%= source_folder %>/extensions/sortabletable/sortabletable.js' }, + { src: 'libs/sortabletable.js', dest: '<%= source_folder %>extensions/sortabletable/sortabletable.js' }, + { src: 'libs/requirejs/require.js', dest: '<%= dist_folder %>require.js' }, // { src: ['**'], cwd: '<%= source_folder %>TF_Modules/', dest: '<%= dist_folder %>TF_Modules/', expand: true }, { src: ['**'], cwd: '<%= source_folder %>TF_Themes/', dest: '<%= dist_folder %>TF_Themes/', expand: true } ] @@ -178,8 +183,9 @@ module.exports = function (grunt) { // This is the default task being executed if Grunt // is called without any further parameter. grunt.registerTask('default', ['jshint', 'babel', 'requirejs', 'concat', 'uglify', 'cssmin', 'copy', 'qunit']); - grunt.registerTask('build', ['jshint', 'babel', 'requirejs', 'concat', 'uglify', 'cssmin', 'copy']); + grunt.registerTask('build', ['jshint', 'babel', 'requirejs', 'concat', /*'uglify',*/ 'cssmin', 'copy']); grunt.registerTask('dev', ['jshint', 'babel', 'concat', 'cssmin', 'copy']); + grunt.registerTask('build-requirejs', ['requirejs']); grunt.registerTask('toes5', ['babel']); grunt.registerTask('test', ['qunit']); }; diff --git a/dist/TF_Modules/tfAdapter.sortabletable.js b/dist/TF_Modules/tfAdapter.sortabletable.js index f1bb210a..55eea305 100644 --- a/dist/TF_Modules/tfAdapter.sortabletable.js +++ b/dist/TF_Modules/tfAdapter.sortabletable.js @@ -54,4 +54,268 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Bug fix: IE9 did not sort columns correctly ------------------------------------------------------------------------*/ -function usNumberConverter(e){return tf_removeNbFormat(e,"us")}function euNumberConverter(e){return tf_removeNbFormat(e,"eu")}function dateConverter(e,t){return tf_formatDate(e,t)}function dmyDateConverter(e){return dateConverter(e,"DMY")}function mdyDateConverter(e){return dateConverter(e,"MDY")}function ymdDateConverter(e){return dateConverter(e,"YMD")}function ddmmmyyyyDateConverter(e){return dateConverter(e,"DDMMMYYYY")}function ipAddress(e){var t=e.split(".");for(x in t){e=t[x];while(3>e.length)e="0"+e;t[x]=e}return e=t.join("."),e}function sortIP(e,t){var n=ipAddress(e.value.tf_LCase()),r=ipAddress(t.value.tf_LCase());return n==r?0:n