Browse Source

Improve uglify, add old style, that selected resolutions are colored black

Felix Schultze 9 years ago
parent
commit
687333c6fc

+ 8 - 5
Gruntfile.js

@@ -23,13 +23,17 @@ module.exports = function(grunt) {
 
     grunt.initConfig({
         pkg: grunt.file.readJSON('package.json'),
+        files : {
+            dest: basicPath + 'dist/<%= pkg.jsname %>.js',
+            destMin: basicPath + 'dist/<%= pkg.jsname %>.min.js'
+        },
         concat: {
           options: {
             separator: ';'
           },
           dist: {
             src: [ basicPath + 'src/**/*.js' ],
-            dest: basicPath + 'dist/<%= pkg.jsname %>.js'
+            dest: '<%= files.dest %>'
           }
         },
 
@@ -61,7 +65,6 @@ module.exports = function(grunt) {
             }
         },
 
-
         uglify: {
             options: {
                 // the banner is inserted at the top of the output
@@ -69,7 +72,7 @@ module.exports = function(grunt) {
             },
             dist: {
                 files: {
-                    'static/js/threeJsHelper/dist/<%= pkg.jsname %>.min.js': ['<%= concat.dist.dest %>']
+                    '<%= files.destMin %>': ['<%= files.dest %>']
                 }
             }
         }
@@ -81,7 +84,7 @@ module.exports = function(grunt) {
     grunt.loadNpmTasks('grunt-contrib-uglify');
 
     grunt.registerTask('default', ['concat', 'uglify']);
-    grunt.registerTask('dev-watch', ['concat:dist']);
+    grunt.registerTask('dev-watch', ['concat', 'uglify' ]);
     grunt.registerTask('update-version', ['shell:bumbVersion']);
-    grunt.registerTask('deploy', ['concat', 'shell:pkg', 'shell:scp', 'shell:rmPkg', 'shell:deploy']);
+    grunt.registerTask('deploy', ['concat', 'uglify', 'shell:pkg', 'shell:scp', 'shell:rmPkg', 'shell:deploy']);
 };

+ 8 - 0
static/css/screen.css

@@ -40,6 +40,14 @@ a:hover {
     text-decoration: underline;
 }
 
+a:not([href]) {
+    color: #333;
+}
+
+a:not([href]):hover {
+    text-decoration: none;
+}
+
 h1, h2, h3, h4, h5 {
     color: #333;
 }

File diff suppressed because it is too large
+ 0 - 1
static/js/threeJsHelper/dist/threeJsHelper.js


File diff suppressed because it is too large
+ 1 - 0
static/js/threeJsHelper/dist/threeJsHelper.min.js


+ 7 - 7
static/js/threeJsHelper/src/Application.js

@@ -169,16 +169,18 @@ IPE.app = {
         $resolutionLinks.on('click', 'a', function(e) {
             e.preventDefault();
             e.stopPropagation();
+            var $this = $(this);
 
-            if($(this).attr('href') == undefined) {
+            if($this.attr('href') == undefined) {
                 return false;
             }
-            requestedSize = $(this).attr('data');
+            requestedSize = $this.attr('data');
 
             $('.res-link').each(function(index, value) {
-                $(value).attr('href', '#');
+                var $value = $(value);
+                $value.attr('href', '#');
             });
-            $(this).removeAttr('href');
+            $this.removeAttr('href');
 
             $.ajax({
                 // todo test after remove of sync flag
@@ -233,8 +235,6 @@ IPE.app = {
             hideBottomControlsContainer();
         });
 
-
-
         $('div#menu-buttons-small-devices input').on('click', function() {
             var $this = $(this),
                 target = $this.attr('data'),
@@ -247,7 +247,6 @@ IPE.app = {
             $overlay.show();
         });
 
-
         $('input#hide-content-small-devices').on('click', function() {
             var $overlay = $('div#overlay-small-devices'),
                 $content = $('div#content-small-devices'),
@@ -897,6 +896,7 @@ function hideBottomControlsContainer() {
 }
 
 function addResolutionLinks() {
+    console.log('addResolutionLinks');
     $resSpan.text(config.defaultSize);
     textureSizes = config.textureSizes;
     textureSizes.forEach(function(size) {

+ 1 - 1
templates/volumes/render.html

@@ -14,7 +14,7 @@
             "{% static 'js/lib/helvetiker_regular.typeface.js' %}?{{ VERSION }}",
             "{% static 'js/lib/kinetic-v5.0.2.min.js' %}?{{ VERSION }}",
             "{% static 'js/generic-slider.js' %}?{{ VERSION }}",
-            "{% static 'js/threeJsHelper/dist/threeJsHelper.min.js' %}?{{ VERSION }}"
+            "{% static 'js/threeJsHelper/dist/threeJsHelper.js' %}?{{ VERSION }}"
         ];
         IPE.additionalCssFiles = [
             "{% static 'css/application.css' %}?{{ VERSION }}"

Some files were not shown because too many files changed in this diff