Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit 5529dcc

Browse files
authored
Merge pull request #13 from mendix/ticket_53351_form_unsaved_issue
Ticket 53351 form unsaved issue
2 parents 755d3af + aece667 commit 5529dcc

14 files changed

Lines changed: 144 additions & 312 deletions

.jshintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"globals" : {
1111
"mendix" : false,
1212
"mx" : false,
13-
"logger" : false
13+
"logger" : false,
14+
"ga" : false
1415
},
1516

1617
// Relaxing

Gruntfile.js

Lines changed: 0 additions & 233 deletions
This file was deleted.

Gulpfile.js

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
// Generated on 2016-11-08 using generator-mendix 2.0.1 :: git+https://github.com/mendix/generator-mendix.git
2+
/*jshint -W069,-W097*/
3+
"use strict";
4+
5+
// In case you seem to have trouble starting Mendix through `gulp modeler`, you might have to set the path to the Mendix application, otherwise leave both values as they are
6+
var MODELER_PATH = null;
7+
var MODELER_ARGS = "/file:{path}";
8+
9+
/********************************************************************************
10+
* Do not edit anything below, unless you know what you are doing
11+
********************************************************************************/
12+
var gulp = require("gulp"),
13+
zip = require("gulp-zip"),
14+
del = require("del"),
15+
newer = require("gulp-newer"),
16+
gutil = require("gulp-util"),
17+
gulpif = require("gulp-if"),
18+
jsonTransform = require("gulp-json-transform"),
19+
intercept = require("gulp-intercept"),
20+
argv = require("yargs").argv,
21+
widgetBuilderHelper = require("widgetbuilder-gulp-helper");
22+
23+
var pkg = require("./package.json"),
24+
paths = widgetBuilderHelper.generatePaths(pkg),
25+
xmlversion = widgetBuilderHelper.xmlversion;
26+
27+
gulp.task("default", function() {
28+
gulp.watch("./src/**/*", ["compress"]);
29+
gulp.watch("./src/**/*.js", ["copy:js"]);
30+
});
31+
32+
gulp.task("clean", function () {
33+
return del([
34+
paths.WIDGET_TEST_DEST,
35+
paths.WIDGET_DIST_DEST
36+
], { force: true });
37+
});
38+
39+
gulp.task("compress", ["clean"], function () {
40+
return gulp.src("src/**/*")
41+
.pipe(zip(pkg.name + ".mpk"))
42+
.pipe(gulp.dest(paths.TEST_WIDGETS_FOLDER))
43+
.pipe(gulp.dest("dist"));
44+
});
45+
46+
gulp.task("copy:js", function () {
47+
return gulp.src(["./src/**/*.js"])
48+
.pipe(newer(paths.TEST_WIDGETS_DEPLOYMENT_FOLDER))
49+
.pipe(gulp.dest(paths.TEST_WIDGETS_DEPLOYMENT_FOLDER));
50+
});
51+
52+
gulp.task("version:xml", function () {
53+
return gulp.src(paths.PACKAGE_XML)
54+
.pipe(xmlversion(argv.n))
55+
.pipe(gulp.dest("./src/"));
56+
});
57+
58+
gulp.task("version:json", function () {
59+
return gulp.src("./package.json")
60+
.pipe(gulpif(typeof argv.n !== "undefined", jsonTransform(function(data) {
61+
data.version = argv.n;
62+
return data;
63+
}, 2)))
64+
.pipe(gulp.dest("./"));
65+
});
66+
67+
gulp.task("icon", function (cb) {
68+
var icon = (typeof argv.file !== "undefined") ? argv.file : "./icon.png";
69+
console.log("\nUsing this file to create a base64 string: " + gutil.colors.cyan(icon));
70+
gulp.src(icon)
71+
.pipe(intercept(function (file) {
72+
console.log("\nCopy the following to your " + pkg.name + ".xml (after description):\n\n" + gutil.colors.cyan("<icon>") + file.contents.toString("base64") + gutil.colors.cyan("<\\icon>") + "\n");
73+
cb();
74+
}));
75+
});
76+
77+
gulp.task("folders", function () {
78+
paths.showPaths(); return;
79+
});
80+
81+
gulp.task("modeler", function (cb) {
82+
widgetBuilderHelper.runmodeler(MODELER_PATH, MODELER_ARGS, paths.TEST_PATH, cb);
83+
});
84+
85+
gulp.task("build", ["compress"]);
86+
gulp.task("version", ["version:xml", "version:json"]);

package.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
{
22
"name": "GoogleAnalytics",
3-
"version": "3.3.2",
3+
"version": "3.3.3",
44
"description": "",
55
"license": "",
66
"author": "",
77
"private": true,
88
"dependencies": {},
99
"devDependencies": {
10-
"grunt": "1.0.1",
11-
"grunt-contrib-clean": "^1.0.0",
12-
"grunt-contrib-compress": "^1.2.0",
13-
"grunt-contrib-copy": "^1.0.0",
14-
"grunt-contrib-watch": "^1.0.0",
15-
"grunt-contrib-csslint": "^1.0.0",
16-
"grunt-newer": "^1.1.1",
17-
"node-base64-image": "^0.1.0",
18-
"shelljs": "^0.7.0",
19-
"xml2js": "^0.4.15",
20-
"semver": "^5.1.0",
21-
"node-mendix-modeler-path": "https://github.com/JelteMX/node-mendix-modeler-path/archive/v1.0.0.tar.gz"
10+
"del": "^2.2.2",
11+
"gulp": "^3.9.1",
12+
"gulp-if": "^2.0.1",
13+
"gulp-intercept": "^0.1.0",
14+
"gulp-json-transform": "^0.4.2",
15+
"gulp-newer": "^1.3.0",
16+
"gulp-util": "^3.0.7",
17+
"gulp-zip": "^3.2.0",
18+
"widgetbuilder-gulp-helper": "https://github.com/JelteMX/widgetbuilder-gulp-helper/archive/1.0.1.tar.gz",
19+
"yargs": "^6.0.0"
2220
},
2321
"engines": {
24-
"node": ">=0.12.0"
22+
"node": ">=5"
2523
},
26-
"generatorVersion": "1.3.5",
24+
"generatorVersion": "2.0.1",
2725
"paths": {
2826
"testProjectFolder": "./test/",
2927
"testProjectFileName": "Test.mpr"
3028
},
3129
"scripts": {
32-
"test": "grunt test"
30+
"build": "node ./node_modules/gulp/bin/gulp build",
31+
"version": "node ./node_modules/gulp/bin/gulp version",
32+
"icon": "node ./node_modules/gulp/bin/gulp icon",
33+
"folders": "node ./node_modules/gulp/bin/gulp folders",
34+
"modeler": "node ./node_modules/gulp/bin/gulp modeler"
3335
}
3436
}

src/GoogleAnalytics/widget/AdvancedPageTracker.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,4 @@ define("GoogleAnalytics/widget/AdvancedPageTracker", [
7070
});
7171
});
7272

73-
require(["GoogleAnalytics/widget/AdvancedPageTracker"], function () {
74-
"use strict";
75-
});
73+
require(["GoogleAnalytics/widget/AdvancedPageTracker"]);

0 commit comments

Comments
 (0)