src/pyams_skin/resources/js/myams.js
changeset 349 0db4dbd31fe2
parent 348 b3c4d616ff30
child 351 5724a7c7a217
equal deleted inserted replaced
348:b3c4d616ff30 349:0db4dbd31fe2
     1 /*
     1 /*
     2  * MyAMS
     2  * MyAMS
     3  * « My Application Management Skin »
     3  * « My Application Management Skin »
     4  *
     4  *
     5  * $Tag: 0.1.16 $ (rev. 1)
     5  * $Tag$ (rev. 1)
     6  * A bootstrap based application/administration skin
     6  * A bootstrap based application/administration skin
     7  *
     7  *
     8  * Custom administration and application skin tools
     8  * Custom administration and application skin tools
     9  * Released under Zope Public License ZPL 1.1
     9  * Released under Zope Public License ZPL 1.1
    10  * ©2014-2016 Thierry Florac <tflorac@ulthar.net>
    10  * ©2014-2016 Thierry Florac <tflorac@ulthar.net>
  3016 		 * Another callback can also be provided to be called after plug-in initialization.
  3016 		 * Another callback can also be provided to be called after plug-in initialization.
  3017 		 *
  3017 		 *
  3018 		 * You can also register plug-ins using the 'register' function
  3018 		 * You can also register plug-ins using the 'register' function
  3019 		 */
  3019 		 */
  3020 		enabled: {
  3020 		enabled: {
       
  3021 
       
  3022 			/**
       
  3023 			 * SVG containers
       
  3024 			 */
       
  3025 			svg: function(element) {
       
  3026 				var svgs = $('.svg-container', element);
       
  3027 				if (svgs.length > 0) {
       
  3028 					svgs.each(function() {
       
  3029 						var container = $(this);
       
  3030 						var svg = $('svg', container);
       
  3031 						svg.get(0).setAttribute('viewBox', '0 0 ' + Math.round(svg.attr('width')) + ' ' + Math.round(svg.attr('height')));
       
  3032 						svg.attr('width', '100%')
       
  3033 						   .attr('height', 'auto');
       
  3034 					})
       
  3035 				}
       
  3036 			},
  3021 
  3037 
  3022 			/**
  3038 			/**
  3023 			 * Label hints
  3039 			 * Label hints
  3024 			 */
  3040 			 */
  3025 			hint: function(element) {
  3041 			hint: function(element) {