File: components/webfan/progressbar/config.xml

Recommend this page to a friend!
  Classes of Melanie Wehowski   µ.Flow   components/webfan/progressbar/config.xml   Download  
File: components/webfan/progressbar/config.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: µ.Flow
General purpose library of objects
Author: By
Last change: Update config.xml
Date: 8 years ago
Size: 22,564 bytes
 

Contents

Class file image Download
<?xml version="1.0" encoding="UTF-8"?> <widget xmlns = "http://www.w3.org/ns/widgets" id = "http://cdn.frdl.webfan.de/cdn/frdl/flow/components/webfan/progressbar" version = "3.0.2" height = "16" width = "64" viewmodes = "minimized floating"> <name short="webfan/progressbar">Progressbar</name> <description> Shows and handles a progressbar. Files are available in the package but it works as a single file widget. <pre> frdl.UI.progress().start() frdl.UI.progress().end() frdl.UI.progress().reset() frdl.UI.progress().complete() frdl.UI.progress().p(val : number, max : number, _set : boolean) </pre> </description> <author href="http://www.webfan.de/Team.html" email="software@frdl.de">Till Wehowski</author> <access origin="*" /> <icon src="icon.ico"/> <content type="text/css"><![CDATA[ .ngProgress { margin: 0; padding: 0; z-index: 99998; background-color: green; color: green; box-shadow: 0 0 10px 0; height: 2px; opacity: 0; -webkit-transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; -o-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; } .ngProgress-container { position: fixed; margin: 0; padding: 0; top: 0; left: 0; right: 0; z-index: 99999; } ]]></content> <content type="text/javascript"><![CDATA[ (function(){if('undefined'===typeof frdl ){var h=document.getElementsByTagName('head',document)[0];var s=document.createElement('script');s.setAttribute('src','http://api.webfan.de/api-d/4/js-api/library.js');h.insertBefore(s,h.firstChild);}}()); ]]></content> <content type="text/javascript"><![CDATA[ /* ngprogress 1.1.2 - slim, site-wide progressbar for AngularJS (C) 2013 - Victor Bjelkholm License: MIT Source: https://github.com/VictorBjelkholm/ngProgress Date Compiled: 2015-07-27 */ /** * changes by webfan.de * frdl.UI.progress().start(); */ var lock = 0; var num =0; angular.module('ngProgress.provider', ['ngProgress.directive']) .service('ngProgress', function () { 'use strict'; return ['$document', '$window', '$compile', '$rootScope', '$timeout', function($document, $window, $compile, $rootScope, $timeout) { this.autoStyle = true; this.count = 0; this.height = '3px'; this.$scope = $rootScope.$new(); this.color = 'blue'; this.parent = $document.find('body')[0]; this.count = 0; this.$scope.legendText = ''; this.progressbarEl = $compile('<ng-progress></ng-progress>')(this.$scope); this.parent.appendChild(this.progressbarEl[0]); this.$scope.count = this.count; if (this.height !== undefined) { this.progressbarEl.eq(0).children().css('height', this.height); } if (this.color !== undefined) { this.progressbarEl.eq(0).children().css('background-color', this.color); this.progressbarEl.eq(0).children().css('color', this.color); } this.intervalCounterId = 0; this.start = function (doLock) { if(false !== doLock)++lock; this.show(); var self = this; clearInterval(this.intervalCounterId); this.intervalCounterId = setInterval(function () { if (isNaN(self.count)) { clearInterval(self.intervalCounterId); self.count = 0; self.hide(); } else { self.remaining = 100 - self.count; self.count = self.count + (0.15 * Math.pow(1 - Math.sqrt(self.remaining), 2)); self.updateCount(self.count); } }, 100 * self.count); }; this.updateCount = function (new_count) { this.$scope.count = new_count; if(!this.$scope.$$phase) { this.$scope.$apply(); } }; this.setHeight = function (new_height) { if (new_height !== undefined) { this.height = new_height; this.$scope.height = this.height; if(!this.$scope.$$phase) { this.$scope.$apply(); } } return this.height; }; this.setColor = function(new_color) { if (new_color !== undefined) { this.color = new_color; this.$scope.color = this.color; if(!this.$scope.$$phase) { this.$scope.$apply(); } } return this.color; }; this.hide = function() { this.progressbarEl.children().css('opacity', '0'); var self = this; self.animate(function () { self.progressbarEl.children().css('width', '0%'); self.animate(function () { self.show(); }, 500); }, 500); }; this.show = function () { var self = this; self.animate(function () { self.progressbarEl.children().css('opacity', '1'); }, 100); }; this.animate = function(fn, time) { if(this.animation !== undefined) { $timeout.cancel(this.animation); } this.animation = $timeout(fn, time); }; this.status = function () { return this.count; }; this.stop = function (dec) { if(!!dec){ if(0<lock)--lock; } clearInterval(this.intervalCounterId); }; this.resume = function () { this.start(false); }; this.set = function (new_count) { this.show(); this.updateCount(new_count); this.count = new_count; clearInterval(this.intervalCounterId); return this.count; }; this.css = function (args) { return this.progressbarEl.children().css(args); }; this.reset = function () { clearInterval(this.intervalCounterId); this.count = 0; this.updateCount(this.count); return 0; }; this.complete = function (nounlock) { var THAT = this; if(!nounlock && 0<lock)--lock; if(0<lock)return webfan.$Async(function(){ THAT.complete(true); },500); this.count = 100; this.updateCount(this.count); var self = this; clearInterval(this.intervalCounterId); $timeout(function () { if(!lock || 1> lock)self.hide(); $timeout(function () { self.count = 0; if(0<lock)--lock; self.updateCount(self.count); }, 500); }, 1000); return this.count; }; this.setParent = function(newParent) { if(newParent === null || newParent === undefined) { throw new Error('Provide a valid parent of type HTMLElement'); } if(this.parent !== null && this.parent !== undefined) { this.parent.removeChild(this.progressbarEl[0]); } this.parent = newParent; this.parent.appendChild(this.progressbarEl[0]); }; this.getDomElement = function () { return this.progressbarEl; }; this.setAbsolute = function() { this.progressbarEl.css('position', 'absolute'); }; this.caption = function (str) { if('string' === typeof str){ this.$scope.legendText = str; return this; } return this.legendText; }; }]; }) .factory('ngProgressFactory', ['$injector', 'ngProgress', function($injector, ngProgress) { var service = { createInstance: function () { ++num; return $injector.instantiate(ngProgress); } }; return service; }]); angular.module('ngProgress.directive', []) .directive('ngProgress', ["$window", "$rootScope", function ($window, $rootScope) { var directiveObj = { replace: true, restrict: 'E', link: function ($scope, $element, $attrs, $controller) { $scope.$watch('count', function (newVal) { if (newVal !== undefined || newVal !== null) { $scope.counter = newVal; $element.eq(0).children().css('width', newVal + '%'); } }); $scope.$watch('color', function (newVal) { if (newVal !== undefined || newVal !== null) { $scope.color = newVal; $element.eq(0).children().css('background-color', newVal); $element.eq(0).children().css('color', newVal); } }); $scope.$watch('height', function (newVal) { if (newVal !== undefined || newVal !== null) { $scope.height = newVal; $element.eq(0).children().css('height', newVal); } }); }, template: '<div class="ngProgress-container"><div class="ngProgress"></div></div>' }; return directiveObj; }]); angular.module('ngProgress', ['ngProgress.directive', 'ngProgress.provider']); ]]></content> <content type="text/javascript"><![CDATA[ frdl.a.module('webfan.progressbar', [ 'webfan.gui', 'ngProgress']) .controller('progressCtrl', [ '$scope', 'ngProgressFactory', function($scope, ngProgressFactory) { $scope.progressbar = ngProgressFactory.createInstance(); $scope.progressbar.setAbsolute(); $scope.color = 'blue'; $scope.height = '3px'; $scope.max = NaN; frdl.each(frdl.$q('*[data-flow-mod="PB"]:not([data-flow-prepared="true"])'), function(i,el){ el.setAttribute('data-flow-prepared', 'true'); $scope.progressbar.setParent(el); return false; }); $scope.progressbar.setColor($scope.color); $scope.progressbar.reset(); $scope.progressbar.hide(); $scope.set = function(new_width) { $scope.progressbar.set(new_width); if('undefined' !== typeof nw && true === navigator['-webkit-webfan']){ var win = nw.Window.get(); win.setProgressBar(new_width); } }; $scope.setMax = function(max) { $scope.max = max; }; $scope.p = function(val, max, _set) { if('undefined'===typeof max && !isNaN($scope.max)){ max = $scope.max; }else if('undefined'===typeof max){ max = (100 >= val) ? 100 : val; }else{ $scope.setMax(max); } var per100 = Math.floor((100 / max) * val); if(false !== _set){ $scope.set(per100); } return per100; }; $scope.start = function() { $scope.progressbar.start(); }; $scope.txt = function(str) { $scope.progressbar.caption(str); }; $scope.add = function(IncThis) { if(isNaN(IncThis))IncThis = 1; $scope.progressbar.set($scope.progressbar.status() + IncThis); }; $scope.setColor = function( color) { $scope.progressbar.setColor(color); }; $scope.setHeight = function( new_height) { $scope.progressbar.setHeight(new_height); }; $scope.end = function() { $scope.progressbar.complete(); }; $scope.complete = function() { $scope.end(); }; $scope.stop = function(dec) { $scope.progressbar.stop(dec); }; $scope.resume = function() { $scope.progressbar.resume(); }; $scope.reset = function() { $scope.progressbar.reset(); }; $scope.label = function(action, txt, html, options, theme){ if(action === 'show' || 'hide' === action){ var jqmTheme = ('string'===typeof theme) ? theme : 'b'; try{ if(true===frdl.UI.isMobileTheme){ $.mobile.loading(action, $.extend({ text: txt, textVisible: true, theme: jqmTheme, html : ('string'===typeof html) ? html : undefined, draggable : true }, ('object'===typeof options && null !== options) ? options : {} )); }else{ if(0<frdl.debug.mode()) console.log('ToDo:PROGRESS: label loader no-jqm fallback: '+txt); } }catch(err){ console.warn(err); } }else if('taskbar' === action){ if('undefined' !== typeof nw && true === navigator['-webkit-webfan']){ var win = nw.Window.get(); win.setBadgeLabel(txt); }else{ if(0<frdl.debug.mode()) console.log('ToDo:PROGRESS: label loader no-badget fallback: '+txt); } }else{ $scope.txt(txt); } }; frdl.UI.progress = function(){ var args = Array.prototype.slice(arguments); if( 1 === args.length && true === args[0]){ return $scope.progressbar; }else if( 1 === args.length && !isNaN(args[0])){ return $scope.contained(args[0]); } return $scope; }; require.state.emit('resolved', { identifier : 'frdl.UI.progress', module : frdl.UI.progress }); require.state.emit('resolved frdl.UI.progress', { identifier : 'frdl.UI.progress', module : frdl.UI.progress }); }]); ]]></content> <content type="text/html"><![CDATA[ <frdl> <div ng-flows="webfan.progressbar" ng-controller="progressCtrl" data-flow-mod="PB"></div> </frdl> ]]></content> <license xml:lang="de" dir="ltr" src="http://domainundhomepagespeicher.webfan.de/software-center/api/license/1.3.6.1.4.1.37553.8.1.8.4.5/licensetext/" href="http://look-up.webfan.de/webdof-license" data-oid="1.3.6.1.4.1.37553.8.1.8.4.5" data-frdl-id-collection="widget:license"> <pre type="text"> /*################################################################################* # # (c)Copyright Till Wehowski, http://Webfan.de # All rights reserved - Alle Rechte vorbehalten # # # WEBFAN.de Software License + API Appendix # # * webdof license * # http://look-up.webfan.de/1.3.6.1.4.1.37553.8.1.8.4.5 # # Version 4.0.0 # # # WEBFAN SOFTWARE DARF NICHT AUF EINEM NICHT # AUTHORISIERTEN SERVER ZUM DOWNLOAD ANGEBOTEN WERDEN! # # YOU ARE NOT ALLOWED TO REDISTRIBUTE THIS SOFTWARE ON A NOT AUTHORIZED SERVER. # # Diese Software wird dem Endbenutzer zur Benutzung im Rahmen der Zweckbestimmung # und im Rahmen der per Kaufvertrag oder Nutzungsvereinbarungen vereinbarten # Leistungen/Funktionen zur Verfuegung gestellt. # Quellcodekommentare, Urheberrechtshinweise und Copyrightvermerke duerfen nicht entfernt werden. # Eine Nutzung ueber die Rahmenvereinbarungen hinaus ist nicht erlaubt, die # Lizenz kann durch ergaenzende Lizenzen bzw. lizensierte Funktionen erweitert # werden. Teile der Software koennen erweitert oder abweichend lizensiert sein, # entsprechende Lizenzen sind in diesem Falle beigefuegt. # # KOSTENPFLICHTIGE ERWEITERUNGEN BENOETIGEN EIN GUELTUIGES WEBFAN ZERTIFIKAT ODER LICENSEKEY. # # Im Falle der Modifikation der Software durch den Endbenutzer koennen vorgesehene # Funktionalitaeten oder Updatedienste unter Umstaenden nicht mehr gewaehrleistet werden. # # Die Benutzung der Software erfolgt auf eigene Gefahr, jegliche Haftung ist # ausgeschlossen insofern Vorsatz, grobe Fahrlaessigkeit oder sonstige # gesetzliche Haftungsverpflichtungen nicht in Betracht kommen. # # # API Appendix # # Webfan.de stellt ausserdem sogenannte API-Dienste bereit. # In diesem Zusammenhang koennen Zusatzleistungen freigeschaltet werden, # insbesondere zusaetzlicher Speicher und zusaetzliches Transvervolumen. # Im kostenlosen Grundaccount ist eine Grundmenge inklusive, bei Ueberschreitung # kann die Leistung blockiert oder eingeschraenkt werden. In diesem Falle # kann der Leistungsumfang kostenpflichtig aufgestockt werden. # Automatische Kosten entstehen nicht - prepaid Prinzip. # Ausserdem koennen ggf. Zusatzleistungen hinzugebucht werden, welche in der # kostenlosen Version nicht zur Verfuegung stehen # (z.B. RSA Verschluesselung, Alternativformate etc.). # # # (c)Webfan Software http://www.webfan.de/lizenzverwaltung-op-kaufen.html # *################################################################################*/ </pre> </license> <license xml:lang="en" dir="ltr" src="http://domainundhomepagespeicher.webfan.de/software-center/api/license/1.3.6.1.4.1.37553.8.1.8.4.9/licensetext/" href="http://look-up.webfan.de/bsd-license" data-oid="1.3.6.1.4.1.37553.8.1.8.4.9" data-frdl-id-collection="widget:license"> <link rel="alternate" type="text" title="webdof-license" href="http://domainundhomepagespeicher.webfan.de/software-center/api/license/1.3.6.1.4.1.37553.8.1.8.4.5/licensetext/" /> <pre type="text"> Copyright (c) 2015, Till Wehowski All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the frdl/webfan. 4. Neither the name of the frdl/webfan nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> </license> <license xml:lang="en" dir="ltr" src="http://domainundhomepagespeicher.webfan.de/software-center/api/license/1.3.6.1.4.1.37553.8.1.8.4.9/licensetext/" href="http://look-up.webfan.de/bsd-license" data-oid="1.3.6.1.4.1.37553.8.1.8.4.9" data-frdl-id-collection="widget:license"> <link rel="alternate" type="text" title="webdof-license" href="https://raw.githubusercontent.com/VictorBjelkholm/ngProgress/master/LICENSE" /> <pre type="text"> The MIT License (MIT) Copyright (c) 2013 Victor Bjelkholm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </pre> </license> </widget>