53 |
54 |
55 |  |
56 | Metro Widgets settings |
57 |
58 |
59 |
There is nothing to setup
60 |
61 |
62 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 | # ioBroker.vis-metro
3 |
4 |   [](https://www.npmjs.com/package/iobroker.vis-metro)
5 | [](https://www.npmjs.com/package/iobroker.vis-metro)
6 |
7 | [](https://nodei.co/npm/iobroker.vis-metro/)
8 |
9 | Metro widget sets for ioBroker.vis. Widgets are styled as Windows Metro interface.
10 | 
11 |
12 | Build with http://metroui.org.ua/.
13 |
14 |
18 | ## Changelog
19 | ### 1.2.0 (2022-02-12)
20 | * (bluefox) Updated build process
21 |
22 | ### 1.1.2 (2017-12-17)
23 | * (bluefox) Fixed metro-string widget
24 |
25 | ### 1.1.1 (2017-05-27)
26 | * (mctom) 2 Widgets added
27 | * (buanet) fix tplMetroTileStateNumber
28 |
29 | ### 1.1.0 (2016-11-12)
30 | * (bluefox) Support of new concept by vis
31 |
32 | ### 1.0.4 (2016-10-11)
33 | * (bluefox) fix Metro Widget Heating
34 |
35 | ### 1.0.3 (2016-09-21)
36 | * (bluefox) fix Metro Widget Tile State / val Badge Number
37 |
38 | ### 1.0.1 (2016-09-13)
39 | * (bluefox) fix Metro Widget "Tile Dialog"
40 |
41 | ### 1.0.0 (2016-03-15)
42 | * (bluefox) remove configuration dialog
43 |
44 | ### 0.2.1 (2016-01-31)
45 | * (vore) add tplMetroTileBoolDialog
46 |
47 | ### 0.2.0 (2015-12-14)
48 | * (bluefox) add custom icon for badges
49 |
50 | ### 0.1.11 (2015-12-03)
51 | * (bluefox) fix Tile ValueList 8: badge icon.
52 |
53 | ### 0.1.10 (2015-12-01)
54 | * (bluefox) fix bool/number widget: badge icon.
55 |
56 | ### 0.1.9 (2015-09-19)
57 | * (bluefox) fix Navigation widget: Brand Background wird nicht angezeigt, sobald Brand Background inactive und Brand Background active den selben Wert haben.
58 | * (instalator) support of old browsers
59 |
60 | ### 0.1.8 (2015-09-06)
61 | * (bluefox) remove prepublish script because installation is not possible
62 |
63 | ### 0.1.6 (2015-08-14)
64 | * (bluefox) prepublish script
65 | * (bluefox) update toggle widget
66 |
67 | ### 0.1.5 (2015-08-12)
68 | * (bluefox) protect against double event: click and touchstart
69 |
70 | ### 0.1.3 (2015-08-05)
71 | * (bluefox) fix metro-tile-heating window icon
72 |
73 | ### 0.1.2 (2015-07-25)
74 | * (bluefox) add mfd icons
75 | * (bluefox) fix widgets with sliders if "min" != 0
76 |
77 | ### 0.1.1 (2015-07-10)
78 | * (bluefox) make content_oid of "Tile Dialog / Badge Number" as object ID
79 |
80 | ### 0.1.0 (2015-06-29)
81 | * (siedi) Add: Service status and humidity to heating tile
82 |
83 | ### 0.0.1 (2015-06-28)
84 | * (bluefox) initial checkin
85 |
86 | ## License
87 | Copyright (c) 2013-2022 hobbyquaker https://github.com/hobbyquaker, bluefox https://github.com/GermanBluefox
88 | MIT
89 |
--------------------------------------------------------------------------------
/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Configuration for probot-stale - https://github.com/probot/stale
2 |
3 | # Number of days of inactivity before an Issue or Pull Request becomes stale
4 | daysUntilStale: 90
5 |
6 | # Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7 | # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8 | daysUntilClose: 7
9 |
10 | # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11 | onlyLabels: []
12 |
13 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14 | exemptLabels:
15 | - enhancement
16 | - security
17 |
18 | # Set to true to ignore issues in a project (defaults to false)
19 | exemptProjects: true
20 |
21 | # Set to true to ignore issues in a milestone (defaults to false)
22 | exemptMilestones: true
23 |
24 | # Set to true to ignore issues with an assignee (defaults to false)
25 | exemptAssignees: false
26 |
27 | # Label to use when marking as stale
28 | staleLabel: wontfix
29 |
30 | # Comment to post when marking as stale. Set to `false` to disable
31 | markComment: >
32 | This issue has been automatically marked as stale because it has not had
33 | recent activity. It will be closed if no further activity occurs within the next 7 days.
34 | Please check if the issue is still relevant in the most current version of the adapter
35 | and tell us. Also check that all relevant details, logs and reproduction steps
36 | are included and update them if needed.
37 | Thank you for your contributions.
38 |
39 | Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab.
40 | Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden.
41 | Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist,
42 | und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte
43 | enthalten sind bzw. aktualisiert diese.
44 | Vielen Dank für Eure Unterstützung.
45 |
46 | # Comment to post when removing the stale label.
47 | # unmarkComment: >
48 | # Your comment here.
49 |
50 | # Comment to post when closing a stale Issue or Pull Request.
51 | closeComment: >
52 | This issue has been automatically closed because of inactivity. Please open a new
53 | issue if still relevant and make sure to include all relevant details, logs and
54 | reproduction steps.
55 | Thank you for your contributions.
56 |
57 | Dieses Problem wurde aufgrund von Inaktivität automatisch geschlossen. Bitte öffnet ein
58 | neues Issue, falls dies noch relevant ist und stellt sicher das alle relevanten Details,
59 | Logs und Reproduktionsschritte enthalten sind.
60 | Vielen Dank für Eure Unterstützung.
61 |
62 | # Limit the number of actions per hour, from 1-30. Default is 30
63 | limitPerRun: 30
64 |
65 | # Limit to only `issues` or `pulls`
66 | only: issues
67 |
68 | # Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
69 | # pulls:
70 | # daysUntilStale: 30
71 | # markComment: >
72 | # This pull request has been automatically marked as stale because it has not had
73 | # recent activity. It will be closed if no further activity occurs. Thank you
74 | # for your contributions.
75 |
76 | # issues:
77 | # exemptLabels:
78 | # - confirmed
--------------------------------------------------------------------------------
/io-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "name": "vis-metro",
4 | "version": "1.2.0",
5 | "news": {
6 | "1.2.0": {
7 | "en": "Updated build process",
8 | "de": "Build-Prozess aktualisiert",
9 | "ru": "Обновленный процесс сборки",
10 | "pt": "Processo de compilação atualizado",
11 | "nl": "Bijgewerkt bouwproces",
12 | "fr": "Processus de construction mis à jour",
13 | "it": "Processo di costruzione aggiornato",
14 | "es": "Proceso de compilación actualizado",
15 | "pl": "Zaktualizowany proces kompilacji",
16 | "zh-cn": "更新的构建过程"
17 | },
18 | "1.1.2": {
19 | "en": "Fixed metro-string widget",
20 | "de": "Korrigiert metro-string widget",
21 | "ru": "Исправлен metro-string widget",
22 | "nl": "Vaste metro-string widget",
23 | "pt": "Atualizado o widget Metro-string",
24 | "fr": "Widget de metro-string fixe"
25 | },
26 | "1.1.1": {
27 | "en": "2 Widgets added\nfix tplMetroTileStateNumber",
28 | "de": "2 Widgets hinzugefügt\nfix tplMetroTileStateNumber",
29 | "ru": "Добавлено 2 виджета\nИсправлен MetroTileStateNumber"
30 | },
31 | "1.1.0": {
32 | "en": "Support of new concept by vis",
33 | "de": "Unterstützung vom neuen vis-Konzept",
34 | "ru": "Поддержка нового концепта vis"
35 | },
36 | "1.0.4": {
37 | "en": "fix Metro Widget Heating",
38 | "de": "Korrigiert Metro Widget Heating",
39 | "ru": "Исправлен виджет Metro Widget Heating"
40 | },
41 | "1.0.3": {
42 | "en": "fix Metro Widget Tile State / val Badge Number",
43 | "de": "Korrigiert Widget Tile State / val Badge Number",
44 | "ru": "Исправлен виджет Tile State / val Badge Number"
45 | },
46 | "1.0.1": {
47 | "en": "fix Metro Widget Tile Dialog",
48 | "de": "Korrigiert Widget Tile Dialog",
49 | "ru": "Исправлен виджет навигации"
50 | }
51 | },
52 | "title": "Metro style Widgets for vis",
53 | "titleLang": {
54 | "en": "Metro style Widgets for vis",
55 | "de": "Widgets im Metro-Stil für vis",
56 | "ru": "Виджеты в стиле Metro для vis",
57 | "pt": "Widgets estilo Metro para vis",
58 | "nl": "Metro-stijl Widgets voor vis",
59 | "fr": "Widgets de style métro pour vis",
60 | "it": "Widget stile metro per vis",
61 | "es": "Widgets de estilo Metro para vis",
62 | "pl": "Widgety w stylu Metro dla vis",
63 | "zh-cn": "用于 vis 的 Metro 风格小部件"
64 | },
65 | "desc": {
66 | "en": "metro Widgets for ioBroker.vis",
67 | "de": "metro Widgets für ioBroker.vis",
68 | "ru": "metro Widgets для ioBroker.vis"
69 | },
70 | "platform": "Javascript/Node.js",
71 | "loglevel": "info",
72 | "icon": "metro.png",
73 | "enabled": true,
74 | "mode": "once",
75 | "extIcon": "https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/master/admin/metro.png",
76 | "keywords": [
77 | "metro",
78 | "vis",
79 | "GUI",
80 | "graphical",
81 | "scada"
82 | ],
83 | "readme": "https://github.com/ioBroker/ioBroker.vis-metro/blob/master/README.md",
84 | "authors": [
85 | "hobbyquaker
"
86 | ],
87 | "localLink": "%web_protocol%://%ip%:%web_port%/vis/edit.html",
88 | "license": "MIT",
89 | "dependencies": [
90 | {
91 | "vis": ">=0.11.1"
92 | }
93 | ],
94 | "onlyWWW": true,
95 | "singleton": true,
96 | "type": "visualization-widgets",
97 | "restartAdapters": [
98 | "vis"
99 | ],
100 | "connectionType": "none",
101 | "dataSource": "none",
102 | "noConfig": true,
103 | "adminUI": {
104 | "config": "none"
105 | }
106 | },
107 | "native": {
108 | "dependencies": [
109 | "jqui-mfd",
110 | "basic"
111 | ]
112 | },
113 | "instanceObjects": []
114 | }
115 |
--------------------------------------------------------------------------------
/.github/workflows/test-and-release.yml:
--------------------------------------------------------------------------------
1 | # This is a composition of lint and test scripts
2 | # Make sure to update this file along with the others
3 |
4 | name: Test and Release
5 |
6 | # Run this job on all pushes and pull requests
7 | # as well as tags with a semantic version
8 | on:
9 | push:
10 | branches:
11 | - master
12 | tags:
13 | # normal versions
14 | - "v?[0-9]+.[0-9]+.[0-9]+"
15 | # pre-releases
16 | - "v?[0-9]+.[0-9]+.[0-9]+-**"
17 | pull_request: {}
18 |
19 | jobs:
20 | # Runs adapter tests on all supported node versions and OSes
21 | adapter-tests:
22 | if: contains(github.event.head_commit.message, '[skip ci]') == false
23 |
24 | runs-on: ${{ matrix.os }}
25 | strategy:
26 | matrix:
27 | node-version: [12.x, 14.x, 16.x]
28 | os: [ubuntu-latest, windows-latest, macos-latest]
29 |
30 | steps:
31 | - uses: actions/checkout@v1
32 | - name: Use Node.js ${{ matrix.node-version }}
33 | uses: actions/setup-node@v1
34 | with:
35 | node-version: ${{ matrix.node-version }}
36 |
37 | - name: Install Dependencies
38 | run: npm install
39 |
40 | - name: Run local tests
41 | run: npm test
42 | # - name: Run unit tests
43 | # run: npm run test:unit
44 | # - name: Run integration tests # (linux/osx)
45 | # if: startsWith(runner.OS, 'windows') == false
46 | # run: DEBUG=testing:* npm run test:integration
47 | # - name: Run integration tests # (windows)
48 | # if: startsWith(runner.OS, 'windows')
49 | # run: set DEBUG=testing:* & npm run test:integration
50 |
51 | # Deploys the final package to NPM
52 | deploy:
53 | needs: [adapter-tests]
54 |
55 | # Trigger this step only when a commit on master is tagged with a version number
56 | if: |
57 | contains(github.event.head_commit.message, '[skip ci]') == false &&
58 | github.event_name == 'push' &&
59 | startsWith(github.ref, 'refs/tags/')
60 | runs-on: ubuntu-latest
61 | strategy:
62 | matrix:
63 | node-version: [14.x]
64 |
65 | steps:
66 | - name: Checkout code
67 | uses: actions/checkout@v2
68 |
69 | - name: Use Node.js ${{ matrix.node-version }}
70 | uses: actions/setup-node@v1
71 | with:
72 | node-version: ${{ matrix.node-version }}
73 |
74 | - name: Extract the version and commit body from the tag
75 | id: extract_release
76 | # The body may be multiline, therefore we need to escape some characters
77 | run: |
78 | VERSION="${{ github.ref }}"
79 | VERSION=${VERSION##*/}
80 | VERSION=${VERSION##*v}
81 | echo "::set-output name=VERSION::$VERSION"
82 | BODY=$(git show -s --format=%b)
83 | BODY="${BODY//'%'/'%25'}"
84 | BODY="${BODY//$'\n'/'%0A'}"
85 | BODY="${BODY//$'\r'/'%0D'}"
86 | echo "::set-output name=BODY::$BODY"
87 |
88 | - name: Install Dependencies
89 | run: npm install
90 |
91 | - name: Publish package to npm
92 | run: |
93 | npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
94 | npm whoami
95 | npm publish
96 |
97 | - name: Create Github Release
98 | uses: actions/create-release@v1
99 | env:
100 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101 | with:
102 | tag_name: ${{ github.ref }}
103 | release_name: Release v${{ steps.extract_release.outputs.VERSION }}
104 | draft: false
105 | # Prerelease versions create pre-releases on GitHub
106 | prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }}
107 | body: ${{ steps.extract_release.outputs.BODY }}
108 |
109 | #- name: Notify Sentry.io about the release
110 | # run: |
111 | # npm i -g @sentry/cli
112 | # export SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
113 | # export SENTRY_URL=https://sentry.iobroker.net
114 | # export SENTRY_ORG=iobroker
115 | # export SENTRY_PROJECT=iobroker-admin
116 | # export SENTRY_VERSION=iobroker.admin@${{ steps.extract_release.outputs.VERSION }}
117 | # sentry-cli releases new $SENTRY_VERSION
118 | # sentry-cli releases finalize $SENTRY_VERSION
119 |
120 | # Add the following line BEFORE finalize if repositories are connected in Sentry
121 | # sentry-cli releases set-commits $SENTRY_VERSION --auto
122 |
123 | # Add the following line BEFORE finalize if sourcemap uploads are needed
124 | # sentry-cli releases files $SENTRY_VERSION upload-sourcemaps build/
125 |
--------------------------------------------------------------------------------
/test/testPackageFiles.js:
--------------------------------------------------------------------------------
1 | /* jshint -W097 */
2 | /* jshint strict:false */
3 | /* jslint node: true */
4 | /* jshint expr: true */
5 | 'use strict';
6 |
7 | const expect = require('chai').expect;
8 | const fs = require('fs');
9 |
10 | describe('Test package.json and io-package.json', () => {
11 | it('Test package files', done => {
12 | console.log();
13 |
14 | const fileContentIOPackage = fs.readFileSync(__dirname + '/../io-package.json', 'utf8');
15 | const ioPackage = JSON.parse(fileContentIOPackage);
16 |
17 | const fileContentNPMPackage = fs.readFileSync(__dirname + '/../package.json', 'utf8');
18 | const npmPackage = JSON.parse(fileContentNPMPackage);
19 |
20 | expect(ioPackage).to.be.an('object');
21 | expect(npmPackage).to.be.an('object');
22 |
23 | expect(ioPackage.common.version, 'ERROR: Version number in io-package.json needs to exist').to.exist;
24 | expect(npmPackage.version, 'ERROR: Version number in package.json needs to exist').to.exist;
25 |
26 | expect(ioPackage.common.version, 'ERROR: Version numbers in package.json and io-package.json needs to match').to.be.equal(npmPackage.version);
27 |
28 | if (!ioPackage.common.news || !ioPackage.common.news[ioPackage.common.version]) {
29 | console.log('WARNING: No news entry for current version exists in io-package.json, no rollback in Admin possible!');
30 | console.log();
31 | }
32 |
33 | expect(npmPackage.author, 'ERROR: Author in package.json needs to exist').to.exist;
34 | expect(ioPackage.common.authors, 'ERROR: Authors in io-package.json needs to exist').to.exist;
35 |
36 | expect(ioPackage.common.license, 'ERROR: License missing in io-package in common.license').to.exist;
37 |
38 | if (ioPackage.common.name.indexOf('template') !== 0) {
39 | if (Array.isArray(ioPackage.common.authors)) {
40 | expect(ioPackage.common.authors.length, 'ERROR: Author in io-package.json needs to be set').to.not.be.equal(0);
41 | if (ioPackage.common.authors.length === 1) {
42 | expect(ioPackage.common.authors[0], 'ERROR: Author in io-package.json needs to be a real name').to.not.be.equal('my Name ');
43 | }
44 | }
45 | else {
46 | expect(ioPackage.common.authors, 'ERROR: Author in io-package.json needs to be a real name').to.not.be.equal('my Name ');
47 | }
48 | }
49 | else {
50 | console.log('WARNING: Testing for set authors field in io-package skipped because template adapter');
51 | console.log();
52 | }
53 | expect(fs.existsSync(__dirname + '/../README.md'), 'ERROR: README.md needs to exist! Please create one with description, detail information and changelog. English is mandatory.').to.be.true;
54 | if (!ioPackage.common.titleLang || typeof ioPackage.common.titleLang !== 'object') {
55 | console.log('WARNING: titleLang is not existing in io-package.json. Please add');
56 | console.log();
57 | }
58 | if (
59 | ioPackage.common.title.indexOf('iobroker') !== -1 ||
60 | ioPackage.common.title.indexOf('ioBroker') !== -1 ||
61 | ioPackage.common.title.indexOf('adapter') !== -1 ||
62 | ioPackage.common.title.indexOf('Adapter') !== -1
63 | ) {
64 | console.log('WARNING: title contains Adapter or ioBroker. It is clear anyway, that it is adapter for ioBroker.');
65 | console.log();
66 | }
67 |
68 | if (!ioPackage.common.controller && !ioPackage.common.onlyWWW && !ioPackage.common.noConfig) {
69 | if (!ioPackage.common.materialize || !fs.existsSync(__dirname + '/../admin/index_m.html') || !fs.existsSync(__dirname + '/../gulpfile.js')) {
70 | console.log('WARNING: Admin3 support is missing! Please add it');
71 | console.log();
72 | }
73 | if (ioPackage.common.materialize) {
74 | expect(fs.existsSync(__dirname + '/../admin/index_m.html'), 'Admin3 support is enabled in io-package.json, but index_m.html is missing!').to.be.true;
75 | }
76 | }
77 |
78 | const licenseFileExists = fs.existsSync(__dirname + '/../LICENSE');
79 | const fileContentReadme = fs.readFileSync(__dirname + '/../README.md', 'utf8');
80 | if (fileContentReadme.indexOf('## Changelog') === -1) {
81 | console.log('Warning: The README.md should have a section ## Changelog');
82 | console.log();
83 | }
84 | expect((licenseFileExists || fileContentReadme.indexOf('## License') !== -1), 'A LICENSE must exist as LICENSE file or as part of the README.md').to.be.true;
85 | if (!licenseFileExists) {
86 | console.log('Warning: The License should also exist as LICENSE file');
87 | console.log();
88 | }
89 | if (fileContentReadme.indexOf('## License') === -1) {
90 | console.log('Warning: The README.md should also have a section ## License to be shown in Admin3');
91 | console.log();
92 | }
93 | done();
94 | });
95 | });
96 |
--------------------------------------------------------------------------------
/widgets/metro/fonts/metroSysIcons.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/widgets/metro/js/metro.js:
--------------------------------------------------------------------------------
1 | var hasTouch = 'ontouchend' in window, eventTimer;
2 | var moveDirection = 'undefined', startX, startY, deltaX, deltaY, mouseDown = false;
3 |
4 | function addTouchEvents(element) {
5 | if (hasTouch) {
6 | element.addEventListener("touchstart", touch2Mouse, true);
7 | element.addEventListener("touchmove", touch2Mouse, true);
8 | element.addEventListener("touchend", touch2Mouse, true);
9 | }
10 | }
11 |
12 | function touch2Mouse(e) {
13 | var theTouch = e.changedTouches[0];
14 | var mouseEv;
15 |
16 | switch(e.type)
17 | {
18 | case "touchstart": mouseEv="mousedown"; break;
19 | case "touchend": mouseEv="mouseup"; break;
20 | case "touchmove": mouseEv="mousemove"; break;
21 | default: return;
22 | }
23 |
24 |
25 | if (mouseEv === "mousedown") {
26 | eventTimer = (new Date()).getTime();
27 | startX = theTouch.clientX;
28 | startY = theTouch.clientY;
29 | mouseDown = true;
30 | }
31 |
32 | if (mouseEv === "mouseup") {
33 | if ((new Date()).getTime() - eventTimer <= 500) {
34 | mouseEv = "click";
35 | } else if ((new Date()).getTime() - eventTimer > 1000) {
36 | mouseEv = "longclick";
37 | }
38 | eventTimer = 0;
39 | mouseDown = false;
40 | }
41 |
42 | if (mouseEv === "mousemove") {
43 | if (mouseDown) {
44 | deltaX = theTouch.clientX - startX;
45 | deltaY = theTouch.clientY - startY;
46 | moveDirection = deltaX > deltaY ? 'horizontal' : 'vertical';
47 | }
48 | }
49 |
50 | var mouseEvent = document.createEvent('MouseEvent');
51 | mouseEvent.initMouseEvent(mouseEv, true, true, window, 1, theTouch.screenX, theTouch.screenY, theTouch.clientX, theTouch.clientY, false, false, false, false, 0, null);
52 | theTouch.target.dispatchEvent(mouseEvent);
53 |
54 | e.preventDefault();
55 | }
56 |
57 |
58 | (function( $ ) {
59 | $.widget('metro.tileTransform', {
60 |
61 | version: "1.2.0",
62 |
63 | options: {},
64 |
65 | _create: function(){
66 | var element = this.element;
67 | var dim = {w: element.width(), h: element.height()};
68 |
69 | element.on('mousedown.metroTransform', function(e){
70 | var X = e.pageX - $(this).offset().left, Y = e.pageY - $(this).offset().top;
71 | var transform = 'top';
72 |
73 | if (X < dim.w * 1/3 && (Y < dim.h * 1/2 || Y > dim.h * 1/2 )) {
74 | transform = 'left';
75 | } else if (X > dim.w * 2/3 && (Y < dim.h * 1/2 || Y > dim.h * 1/2 )) {
76 | transform = 'right'
77 | } else if (X > dim.w*1/3 && X dim.h/2) {
78 | transform = 'bottom';
79 | }
80 |
81 |
82 |
83 | setTimeout(function ($this) {
84 | $this.addClass('tile-transform-'+transform);
85 | }, 10, $(this));
86 |
87 | });
88 |
89 | element.on('mouseup.metroTransform', function(){
90 |
91 |
92 | setTimeout(function ($this) {
93 | $this.removeClass('tile-transform-left')
94 | .removeClass('tile-transform-right')
95 | .removeClass('tile-transform-top')
96 | .removeClass('tile-transform-bottom');
97 | }, 10, $(this));
98 |
99 |
100 |
101 | });
102 | element.on('mouseleave.metroTransform', function(){
103 | $(this)
104 | .removeClass('tile-transform-left')
105 | .removeClass('tile-transform-right')
106 | .removeClass('tile-transform-top')
107 | .removeClass('tile-transform-bottom');
108 | });
109 | },
110 |
111 | _destroy: function(){
112 |
113 | },
114 |
115 | _setOption: function(key, value){
116 | this._super('_setOption', key, value);
117 | }
118 | })
119 |
120 | $.widget("metro.inputControl", {
121 |
122 | version: "1.0.0",
123 |
124 | options: {
125 | },
126 |
127 | _create: function(){
128 | var that = this,
129 | control = this.element;
130 |
131 | if (control.hasClass('text')) {
132 | this.initTextInput(control, that);
133 | } else if (control.hasClass('password')) {
134 | this.initPasswordInput(control, that);
135 | } else if (control.hasClass('checkbox') || control.hasClass('radio') || control.hasClass('switch')) {
136 | this.initCheckboxInput(control, that);
137 | } else if (control.hasClass('file')) {
138 | this.initFileInput(control, that);
139 | }
140 | },
141 |
142 | initCheckboxInput: function(el, that) {
143 | },
144 |
145 | initFileInput: function(el, that){
146 | var button, input, wrapper;
147 | wrapper = $("");
148 | button = el.children('.btn-file');
149 | input = el.children('input[type="file"]');
150 | input.css('z-index', 0);
151 | wrapper.insertAfter(input);
152 | input.attr('tabindex', '-1');
153 | //button.attr('tabindex', '-1');
154 | button.attr('type', 'button');
155 |
156 | input.on('change', function(){
157 | var val = $(this).val();
158 | if (val != '') {
159 | wrapper.val(val);
160 | }
161 | });
162 |
163 | button.on('click', function(){
164 | input.trigger('click');
165 | });
166 | },
167 |
168 | initTextInput: function(el, that){
169 | var button = el.children('.btn-clear'),
170 | input = el.children('input[type=text]');
171 |
172 | //console.log(button.length);
173 | //button = el.children('.btn-clear');
174 |
175 | if (button.length == 0) return;
176 |
177 | button.attr('tabindex', '-1');
178 | button.attr('type', 'button');
179 |
180 | button.on('click', function(){
181 | input = el.children('input');
182 | if (input.prop('readonly')) return;
183 | input.val('');
184 | input.focus();
185 | that._trigger("onClear", null, el);
186 | });
187 |
188 | if (!input.attr("disabled")) input.on('click', function(){$(this).focus();});
189 | },
190 |
191 | initPasswordInput: function(el, that){
192 | var button = el.children('.btn-reveal'),
193 | input = el.children('input[type=password]');
194 | var wrapper;
195 |
196 | if (button.length == 0) return;
197 |
198 | button.attr('tabindex', '-1');
199 | button.attr('type', 'button');
200 |
201 | button.on('mousedown', function(e){
202 | input.attr('type', 'text');
203 | //e.preventDefault();
204 |
205 | // wrapper = el.find(".__wrapper__").length == 0 ? $('') : el.find(".__wrapper__");
206 | //
207 | // input.hide();
208 | // wrapper.appendTo(that.element);
209 | // wrapper.val(input.val());
210 | //
211 | // that._trigger("onPasswordShow", null, that.element);
212 | });
213 |
214 | button.on('mouseup, mouseleave, blur', function(e){
215 | input.attr('type', 'password').focus();
216 | //e.preventDefault();
217 |
218 |
219 | // input.show().focus();
220 | // wrapper.remove();
221 | //
222 | // that._trigger("onPasswordHide", null, that.element);
223 | });
224 |
225 | if (!input.attr("disabled")) input.on('click', function(){$(this).focus();});
226 | },
227 |
228 | _destroy: function(){
229 |
230 | },
231 |
232 | _setOption: function(key, value){
233 | this._super('_setOption', key, value);
234 | }
235 | });
236 |
237 | $.widget("metro.inputTransform", {
238 |
239 | version: "1.0.0",
240 |
241 | options: {
242 | transformType: "text"
243 | },
244 |
245 | _create: function(){
246 | var that = this,
247 | element = this.element,
248 | inputType;
249 |
250 |
251 | var checkTransform = element.parent().hasClass("input-control");
252 | if (checkTransform) return;
253 |
254 | inputType = element.get(0).tagName.toLowerCase();
255 |
256 | if (inputType == "textarea") {
257 | this.options.transformType = "textarea";
258 | } else if (inputType == "select") {
259 | this.options.transformType = "select";
260 | } else {
261 | if (element.data('transformType') != undefined) {
262 | this.options.transformType = element.data('transformType');
263 | } else {
264 | this.options.transformType = element.attr("type");
265 | }
266 | }
267 |
268 | var control = undefined;
269 |
270 | switch (this.options.transformType) {
271 | case "password": control = this._createInputPassword(); break;
272 | case "file": control = this._createInputFile(); break;
273 | case "checkbox": control = this._createInputCheckbox(); break;
274 | case "radio": control = this._createInputRadio(); break;
275 | case "switch": control = this._createInputSwitch(); break;
276 | case "select": control = this._createInputSelect(); break;
277 | case "textarea": control = this._createInputTextarea(); break;
278 | case "search": control = this._createInputSearch(); break;
279 | case "email": control = this._createInputEmail(); break;
280 | case "tel": control = this._createInputTel(); break;
281 | case "number": control = this._createInputNum(); break;
282 | default: control = this._createInputText();
283 | }
284 |
285 | control.inputControl();
286 | },
287 |
288 | _createInputTextarea: function(){
289 | var element = this.element;
290 |
291 | var wrapper = $("").addClass("input-control").addClass("textarea");
292 | var clone = element.clone(true);
293 | var parent = element.parent();
294 |
295 | clone.appendTo(wrapper);
296 | wrapper.insertBefore(element);
297 |
298 | element.remove();
299 |
300 | return wrapper;
301 | },
302 |
303 | _createInputSelect: function(){
304 | var element = this.element;
305 |
306 | var wrapper = $("").addClass("input-control").addClass("select");
307 | var clone = element.clone(true);
308 | var parent = element.parent();
309 |
310 | clone.val(element.val()).appendTo(wrapper);
311 | wrapper.insertBefore(element);
312 |
313 | element.remove();
314 |
315 | return wrapper;
316 | },
317 |
318 | _createInputSwitch: function(){
319 | var element = this.element;
320 |
321 | var wrapper = $("").addClass("input-control").addClass("switch");
322 | var label = $("");
323 | var button = $("").addClass("check");
324 | var clone = element.clone(true);
325 | var parent = element.parent();
326 | var caption = $("").addClass("caption").html( element.data('caption') != undefined ? element.data('caption') : "" );
327 |
328 | label.appendTo(wrapper);
329 | clone.appendTo(label);
330 | button.appendTo(label);
331 | caption.appendTo(label);
332 |
333 | wrapper.insertBefore(element);
334 | element.remove();
335 |
336 | return wrapper;
337 | },
338 |
339 | _createInputCheckbox: function(){
340 | console.log('checkbox!');
341 | var element = this.element;
342 |
343 | var wrapper = $("").addClass("input-control").addClass("checkbox");
344 | var label = $("");
345 | var button = $("").addClass("check");
346 | var clone = element.clone(true);
347 | var parent = element.parent();
348 | var caption = $("").addClass("caption").html( element.data('caption') != undefined ? element.data('caption') : "" );
349 |
350 | label.appendTo(wrapper);
351 | clone.appendTo(label);
352 | button.appendTo(label);
353 | caption.appendTo(label);
354 |
355 | wrapper.insertBefore(element);
356 | element.remove();
357 |
358 | return wrapper;
359 | },
360 |
361 | _createInputRadio: function(){
362 | var element = this.element;
363 |
364 | var wrapper = $("").addClass("input-control").addClass("radio");
365 | var label = $("");
366 | var button = $("").addClass("check");
367 | var clone = element.clone(true);
368 | var parent = element.parent();
369 | var caption = $("").addClass("caption").html( element.data('caption') != undefined ? element.data('caption') : "" );
370 |
371 | label.appendTo(wrapper);
372 | clone.appendTo(label);
373 | button.appendTo(label);
374 | caption.appendTo(label);
375 |
376 | wrapper.insertBefore(element);
377 | element.remove();
378 |
379 | return wrapper;
380 | },
381 |
382 | _createInputSearch: function(){
383 | return this._createInputVal("text", "btn-search");
384 | },
385 |
386 | _createInputNum: function(){
387 | return this._createInputVal("number", "btn-clear");
388 | },
389 |
390 | _createInputTel: function(){
391 | return this._createInputVal("tel", "btn-clear");
392 | },
393 |
394 | _createInputEmail: function(){
395 | return this._createInputVal("email", "btn-clear");
396 | },
397 |
398 | _createInputText: function(){
399 | return this._createInputVal("text", "btn-clear");
400 | },
401 |
402 | _createInputPassword: function(){
403 | return this._createInputVal("password", "btn-reveal");
404 | },
405 |
406 | _createInputFile: function(){
407 | return this._createInputVal("file", "btn-file");
408 | },
409 |
410 | _createInputVal: function(name, buttonName) {
411 | var element = this.element;
412 |
413 | var wrapper = $("").addClass("input-control").addClass(name);
414 | var button = $("").addClass(buttonName);
415 | var clone = element.clone(true);
416 | var parent = element.parent();
417 |
418 | clone.appendTo(wrapper);
419 | button.appendTo(wrapper);
420 |
421 | wrapper.insertBefore(element);
422 | element.remove();
423 |
424 | return wrapper;
425 | },
426 |
427 | _destroy: function(){},
428 |
429 | _setOption: function(key, value){
430 | this._super('_setOption', key, value);
431 | }
432 | });
433 |
434 |
435 |
436 |
437 | /* To add touch support for element need create listeners for component dom element
438 | if (hasTouch) {
439 | element.addEventListener("touchstart", touch2Mouse, true);
440 | element.addEventListener("touchmove", touch2Mouse, true);
441 | element.addEventListener("touchend", touch2Mouse, true);
442 | }*/
443 |
444 |
445 |
446 | $.widget("metro.metroSlider", {
447 |
448 | version: "1.0.2",
449 |
450 |
451 |
452 | options: {
453 | position: 0,
454 | accuracy: 0,
455 | color: 'default',
456 | completeColor: 'default',
457 | markerColor: 'default',
458 | colors: [],
459 | showHint: false,
460 | sliderActive: false,
461 | change: function(value, slider){},
462 | changed: function(value, slider){},
463 | min: 0,
464 | max: 100,
465 | animate: true,
466 |
467 | _slider: {
468 | vertical: false,
469 | offset: 0,
470 | length: 0,
471 | marker: 0,
472 | ppp: 0,
473 | start: 0,
474 | stop: 0
475 | }
476 | },
477 |
478 |
479 | _create: function(){
480 | var that = this,
481 | element = this.element,
482 |
483 | o = this.options,
484 | s = this.options._slider;
485 |
486 | if (element.data('accuracy') != undefined) {
487 | o.accuracy = element.data('accuracy') > 0 ? element.data('accuracy') : 0;
488 | }
489 | if (element.data('animate') != undefined) {
490 | o.animate = element.data('animate');
491 | }
492 | if (element.data('min') != undefined) {
493 | o.min = element.data('min');
494 | }
495 | o.min = o.min < 0 ? 0 : o.min;
496 | o.min = o.min > o.max ? o.max : o.min;
497 | if (element.data('max') != undefined) {
498 | o.max = element.data('max');
499 | }
500 | o.max = o.max > 100 ? 100 : o.max;
501 | o.max = o.max < o.min ? o.min : o.max;
502 | if (element.data('position') != undefined) {
503 | o.position = this._correctValue(element.data('position') > this.options.min ? (element.data('position') > this.options.max ? this.options.max : element.data('position')) : this.options.min);
504 | }
505 | if (element.data('color') != undefined) {
506 | o.color = element.data('color');
507 | }
508 | if (element.data('completeColor') != undefined) {
509 | o.completeColor = element.data('completeColor');
510 | }
511 | if (element.data('markerColor') != undefined) {
512 | o.markerColor = element.data('markerColor');
513 | }
514 | if (element.data('colors') != undefined) {
515 | o.colors = element.data('colors').split(",");
516 | }
517 | if (element.data('showHint') != undefined) {
518 | o.showHint = element.data('showHint');
519 | }
520 |
521 | s.vertical = element.hasClass("vertical");
522 |
523 | this._createSlider();
524 | setTimeout(function (_this, _that, _element) {
525 | _this._initPoints();
526 | _this._placeMarker(o.position);
527 |
528 | addTouchEvents(_element[0]);
529 |
530 | _element.children('.marker').on('mousedown.metroSlider', function (e) {
531 | e.preventDefault();
532 | _that._startMoveMarker(e);
533 | });
534 |
535 | _element.on('mousedown.metroSlider', function (e) {
536 | e.preventDefault();
537 | _that._startMoveMarker(e);
538 | });
539 | }, 0, this, that, element);
540 |
541 | },
542 |
543 | _startMoveMarker: function(e){
544 | var element = this.element, o = this.options, that = this, hint = element.children('.hint');
545 | that.sliderActive = true;
546 | $(document).on('touchend.metroSlider', function () {
547 | $(document).off('mousemove.metroSlider');
548 | $(document).off('mouseup.metroSlider');
549 | element.data('value', that.options.position);
550 | element.trigger('changed', that.options.position);
551 | o.changed(that.options.position, element);
552 | if (!element.hasClass('permanent-hint')) {
553 | hint.css('display', 'none');
554 | }
555 | });
556 | $(document).on('mousemove.metroSlider', function (event) {
557 | that._movingMarker(event);
558 | if (!element.hasClass('permanent-hint')) {
559 | hint.css('display', 'block');
560 | }
561 | });
562 | $(document).on('mouseup.metroSlider', function () {
563 | that.sliderActive = false;
564 | $(document).off('mousemove.metroSlider');
565 | $(document).off('mouseup.metroSlider');
566 | element.data('value', that.options.position);
567 | element.trigger('changed', that.options.position);
568 | o.changed(that.options.position, element);
569 | if (!element.hasClass('permanent-hint')) {
570 | hint.css('display', 'none');
571 | }
572 | });
573 |
574 |
575 | this._initPoints();
576 |
577 | this._movingMarker(e)
578 | },
579 |
580 | _movingMarker: function (event) {
581 | var cursorPos,
582 | percents,
583 | valuePix,
584 |
585 | vertical = this.options._slider.vertical,
586 | sliderOffset = this.options._slider.offset,
587 | sliderStart = this.options._slider.start,
588 | sliderEnd = this.options._slider.stop,
589 | sliderLength = this.options._slider.length,
590 | markerSize = this.options._slider.marker;
591 |
592 | if (vertical) {
593 | cursorPos = event.pageY - sliderOffset;
594 | } else {
595 | cursorPos = event.pageX - sliderOffset;
596 | }
597 |
598 | if (cursorPos < sliderStart) {
599 | cursorPos = sliderStart;
600 | } else if (cursorPos > sliderEnd) {
601 | cursorPos = sliderEnd;
602 | }
603 |
604 | if (vertical) {
605 | valuePix = sliderLength - cursorPos - markerSize / 2;
606 | } else {
607 | valuePix = cursorPos - markerSize / 2;
608 | }
609 |
610 | percents = this._pixToPerc(valuePix);
611 |
612 | this._placeMarker(percents);
613 |
614 | this.options.position = percents;
615 |
616 | this.options.change(Math.round(percents), this.element);
617 | },
618 |
619 | _placeMarker: function (value) {
620 | var size, size2, o = this.options, colorParts = 0, colorIndex = 0, colorDelta = 0,
621 | marker = this.element.children('.marker'),
622 | complete = this.element.children('.complete'),
623 | hint = this.element.children('.hint'),
624 | oldPos = this._percToPix(this.options.position);
625 |
626 | colorParts = o.colors.length;
627 | colorDelta = o._slider.length / colorParts;
628 |
629 | if (this.options._slider.vertical) {
630 | var oldSize = this._percToPix(this.options.position) + this.options._slider.marker,
631 | oldSize2 = this.options._slider.length - oldSize;
632 | size = this._percToPix(value) + this.options._slider.marker;
633 | size2 = this.options._slider.length - size;
634 | this._animate(marker.css('top', oldSize2),{top: size2});
635 | this._animate(complete.css('height', oldSize),{height: size});
636 | if (colorParts) {
637 | colorIndex = Math.round(size / colorDelta)-1;
638 | complete.css('background-color', o.colors[colorIndex<0?0:colorIndex]);
639 | }
640 | if (o.showHint) {
641 | hint.html(Math.round(value)).css('top', size2 - hint.height()/2);
642 | }
643 | } else {
644 | size = this._percToPix(value);
645 | this._animate(marker.css('left', oldPos),{left: size});
646 | this._animate(complete.css('width', oldPos),{width: size});
647 | if (colorParts) {
648 | colorIndex = Math.round(size / colorDelta)-1;
649 | complete.css('background-color', o.colors[colorIndex<0?0:colorIndex]);
650 | }
651 | if (o.showHint) {
652 | this._animate(hint.html(Math.round(value)).css('left', oldPos - hint.width() / 2), {left: size - hint.width() / 2});
653 | }
654 | }
655 |
656 | },
657 |
658 | _animate: function (obj, val) {
659 | if(this.options.animate) {
660 | obj.stop(true).animate(val);
661 | } else {
662 | obj.css(val);
663 | }
664 | },
665 |
666 | _pixToPerc: function (valuePix) {
667 | var valuePerc;
668 | valuePerc = valuePix * this.options._slider.ppp;
669 | return this._correctValue(valuePerc);
670 | },
671 |
672 | _percToPix: function (value) {
673 | if (this.options._slider.ppp === 0) {
674 | return 0;
675 | }
676 | return value / this.options._slider.ppp;
677 | },
678 |
679 | _correctValue: function (value) {
680 | var accuracy = this.options.accuracy;
681 | var max = this.options.max;
682 | var min = this.options.min;
683 | if (accuracy === 0) {
684 | return value;
685 | }
686 | if (value === max) {
687 | return max;
688 | }
689 | if (value === min) {
690 | return min;
691 | }
692 | value = Math.floor(value / accuracy) * accuracy + Math.round(value % accuracy / accuracy) * accuracy;
693 | if (value > max) {
694 | return max;
695 | }
696 | if (value < min) {
697 | return min;
698 | }
699 | return value;
700 | },
701 |
702 | _initPoints: function(){
703 | var s = this.options._slider, element = this.element;
704 |
705 | if (s.vertical) {
706 | s.offset = element.offset().top;
707 | s.length = element.height();
708 | s.marker = element.children('.marker').height();
709 | } else {
710 | s.offset = element.offset().left;
711 | s.length = element.width();
712 | s.marker = element.children('.marker').width();
713 | }
714 | s.ppp = this.options.max / (s.length - s.marker);
715 | s.start = s.marker / 2;
716 | s.stop = s.length - s.marker / 2;
717 | },
718 |
719 | _createSlider: function(){
720 | var element = this.element,
721 | options = this.options,
722 | complete, marker, hint;
723 |
724 | element.html('');
725 |
726 | complete = $("").addClass("complete").appendTo(element);
727 | marker = $("").addClass("marker").appendTo(element);
728 |
729 | if (options.showHint) {
730 | hint = $("").addClass("hint").appendTo(element);
731 | }
732 |
733 | if (options.color != 'default') {
734 | element.css('background-color', options.color);
735 | }
736 | if (options.completeColor != 'default') {
737 | complete.css('background-color', options.completeColor);
738 | }
739 | if (options.markerColor != 'default') {
740 | marker.css('background-color', options.markerColor);
741 | }
742 | },
743 |
744 | value: function (value) {
745 | if (this.sliderActive) return false;
746 | value = value > this.options.max ? this.options.max : value;
747 | value = value < this.options.min ? this.options.min : value;
748 | if (typeof value !== 'undefined') {
749 | this._placeMarker(parseInt(value));
750 | this.options.position = parseInt(value);
751 | //this.options.change(Math.round(parseInt(value)), this.element);
752 | return this;
753 | } else {
754 | return Math.round(this.options.position);
755 | }
756 | },
757 |
758 | _destroy: function(){},
759 |
760 | _setOption: function(key, value){
761 | this._super('_setOption', key, value);
762 | }
763 | });
764 |
765 | if (typeof METRO_DIALOG == "undefined") {
766 | var METRO_DIALOG = false;
767 | }
768 |
769 | $.metroDialog = function (params) {
770 |
771 | if (!$.metroDialog.opened) {
772 | $.metroDialog.opened = true;
773 | } else {
774 | return METRO_DIALOG;
775 | }
776 |
777 | $.metroDialog.settings = params;
778 |
779 | params = $.extend({
780 | icon: false,
781 | title: '',
782 | content: '',
783 | flat: false,
784 | shadow: false,
785 | overlay: false,
786 | width: 'auto',
787 | height: 'auto',
788 | position: 'default',
789 | padding: false,
790 | overlayClickClose: false,
791 | sysButtons: {
792 | btnClose: true
793 | },
794 | onShow: function(_dialog){},
795 | sysBtnCloseClick: function(event){},
796 | sysBtnMinClick: function(event){},
797 | sysBtnMaxClick: function(event){}
798 | }, params);
799 |
800 | var _overlay, _window, _caption, _content;
801 |
802 | _overlay = $("").addClass("metro window-overlay");
803 |
804 | if (params.overlay) {
805 | _overlay.css({
806 | backgroundColor: 'rgba(0,0,0,.7)'
807 | });
808 | }
809 |
810 | _window = $("").addClass("window");
811 | if (params.flat) _window.addClass("flat");
812 | if (params.shadow) _window.addClass("shadow").css('overflow', 'hidden');
813 | _caption = $("").addClass("caption");
814 | _content = $("").addClass("content");
815 | _content.css({
816 | paddingTop: params.padding, // +32
817 | paddingLeft: params.padding,
818 | paddingRight: params.padding,
819 | paddingBottom: params.padding
820 | });
821 |
822 | if (params.sysButtons) {
823 | if (params.sysButtons.btnClose) {
824 | $("").addClass("btn-close").on('click', function(e){
825 | e.preventDefault();
826 | e.stopPropagation();
827 | $.metroDialog.close();
828 | params.sysBtnCloseClick(e);
829 | }).appendTo(_caption);
830 | }
831 | if (params.sysButtons.btnMax) {
832 | $("").addClass("btn-max").on('click', function(e){
833 | e.preventDefault();
834 | e.stopPropagation();
835 | params.sysBtnMaxClick(e);
836 | }).appendTo(_caption);
837 | }
838 | if (params.sysButtons.btnMin) {
839 | $("").addClass("btn-min").on('click', function(e){
840 | e.preventDefault();
841 | e.stopPropagation();
842 | params.sysBtnMinClick(e);
843 | }).appendTo(_caption);
844 | }
845 | }
846 |
847 | if (params.icon) $(params.icon).addClass("icon").appendTo(_caption);
848 | $("").addClass("title").html(params.title).appendTo(_caption);
849 |
850 | _content.html(params.content);
851 |
852 | _caption.appendTo(_window);
853 | _content.appendTo(_window);
854 | _window.appendTo(_overlay);
855 |
856 | if (params.width != 'auto') _window.css('width', params.width);
857 | if (params.height != 'auto') _window.css('height', params.height);
858 |
859 | _overlay.hide().appendTo('body').fadeIn('fast');
860 |
861 | METRO_DIALOG = _window;
862 |
863 | _window
864 | .css("position", "fixed")
865 | .css("z-index", parseInt(_overlay.css('z-index'))+1)
866 | .css("top", ($(window).height() - METRO_DIALOG.outerHeight()) / 2 )
867 | .css("left", ($(window).width() - _window.outerWidth()) / 2)
868 | ;
869 |
870 | addTouchEvents(_window[0]);
871 |
872 | if(params.draggable) {
873 | _caption.on("mousedown", function(e) {
874 | $.metroDialog.drag = true;
875 | _caption.css('cursor', 'move');
876 |
877 | var z_idx = _window.css('z-index'),
878 | drg_h = _window.outerHeight(),
879 | drg_w = _window.outerWidth(),
880 | pos_y = _window.offset().top + drg_h - e.pageY,
881 | pos_x = _window.offset().left + drg_w - e.pageX;
882 |
883 | _window.css('z-index', 99999).parents().on("mousemove", function(e) {
884 | var t = (e.pageY > 0)?(e.pageY + pos_y - drg_h):(0);
885 | var l = (e.pageX > 0)?(e.pageX + pos_x - drg_w):(0);
886 |
887 | if ($.metroDialog.drag) {
888 | if(t >= 0 && t <= window.innerHeight - _window.outerHeight()) {
889 | _window.offset({top: t});
890 | }
891 | if(l >= 0 && l <= window.innerWidth - _window.outerWidth()) {
892 | _window.offset({left: l});
893 | }
894 | }
895 | });
896 | e.preventDefault();
897 | }).on("mouseup", function () {
898 | _window.removeClass('draggable');
899 | $.metroDialog.drag = false;
900 | _caption.css('cursor', 'default');
901 | });
902 | }
903 |
904 | _window.on('click', function (e){
905 | e.stopPropagation();
906 | });
907 |
908 | if (params.overlayClickClose) {
909 | _overlay.on('click', function (e){
910 | e.preventDefault();
911 | $.metroDialog.close();
912 | });
913 | }
914 |
915 | params.onShow(METRO_DIALOG);
916 |
917 | $.metroDialog.autoResize();
918 |
919 | return METRO_DIALOG;
920 | }
921 |
922 | $.metroDialog.content = function(newContent) {
923 | if(!$.metroDialog.opened || METRO_DIALOG == undefined) {
924 | return false;
925 | }
926 |
927 | if(newContent) {
928 | METRO_DIALOG.children(".content").html(newContent);
929 | $.metroDialog.autoResize();
930 | return true;
931 | } else {
932 | return METRO_DIALOG.children(".content").html();
933 | }
934 | }
935 |
936 | $.metroDialog.title = function(newTitle) {
937 | if(!$.metroDialog.opened || METRO_DIALOG == undefined) {
938 | return false;
939 | }
940 |
941 | var _title = METRO_DIALOG.children('.caption').children('.title');
942 |
943 | if(newTitle) {
944 | _title.html(newTitle);
945 | } else {
946 | _title.html();
947 | }
948 |
949 | return true;
950 | };
951 |
952 | $.metroDialog.autoResize = function () {
953 | if(!$.metroDialog.opened || METRO_DIALOG == undefined) {
954 | return false;
955 | }
956 |
957 | var _content = METRO_DIALOG.children(".content");
958 |
959 | var top = ($(window).height() - METRO_DIALOG.outerHeight()) / 2;
960 | var left = ($(window).width() - METRO_DIALOG.outerWidth()) / 2;
961 |
962 | METRO_DIALOG.css({
963 | width: _content.outerWidth(),
964 | height: _content.outerHeight(),
965 | top: top,
966 | left: left
967 | });
968 |
969 | return true;
970 | };
971 |
972 | $.metroDialog.close = function () {
973 | if(!$.metroDialog.opened || !METRO_DIALOG) {
974 | return false;
975 | }
976 |
977 | $.metroDialog.opened = false;
978 | var _overlay = METRO_DIALOG.parent(".window-overlay");
979 | _overlay.fadeOut(function () {
980 | $(this).remove();
981 | METRO_DIALOG = false;
982 | });
983 |
984 | return false;
985 | }
986 | })(jQuery);
987 |
--------------------------------------------------------------------------------
/widgets/metro/css/iconFont.min.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'iconFont';
3 | src: url('../fonts/iconFont.eot');
4 | src: url('../fonts/iconFont.eot?#iefix') format('embedded-opentype'), url('../fonts/iconFont.woff') format('woff'), url('../fonts/iconFont.ttf') format('truetype'), url('../fonts/iconFont.svg#iconFont') format('svg');
5 | font-weight: normal;
6 | font-style: normal
7 | }
8 |
9 | .metro [data-icon]:before {
10 | font-family: 'iconFont';
11 | content: attr(data-icon);
12 | speak: none;
13 | font-weight: normal;
14 | font-variant: normal;
15 | text-transform: none;
16 | line-height: 1;
17 | -webkit-font-smoothing: antialiased
18 | }
19 |
20 | .metro [class*="icon-"] {
21 | font-family: 'iconFont' !important;
22 | speak: none;
23 | font-style: normal;
24 | font-weight: normal !important;
25 | font-variant: normal;
26 | text-transform: none;
27 | text-decoration: inherit;
28 | line-height: 1;
29 | display: inline-block;
30 | vertical-align: -8%;
31 | -webkit-font-smoothing: antialiased;
32 | font-size: inherit
33 | }
34 |
35 | .metro [class*="icon-"].smaller {
36 | font-size: .7em;
37 | vertical-align: 6%
38 | }
39 |
40 | .metro [class*="icon-"].large {
41 | font-size: 1.2em;
42 | vertical-align: -10%
43 | }
44 |
45 | .metro .icon-custom:before {
46 | content: ""
47 | }
48 |
49 | .metro .icon-newspaper:before {
50 | content: "\e001"
51 | }
52 |
53 | .metro .icon-pencil:before {
54 | content: "\e002"
55 | }
56 |
57 | .metro .icon-droplet:before {
58 | content: "\e003"
59 | }
60 |
61 | .metro .icon-pictures:before {
62 | content: "\e004"
63 | }
64 |
65 | .metro .icon-camera:before {
66 | content: "\e005"
67 | }
68 |
69 | .metro .icon-music:before {
70 | content: "\e006"
71 | }
72 |
73 | .metro .icon-film:before {
74 | content: "\e007"
75 | }
76 |
77 | .metro .icon-camera-2:before {
78 | content: "\e008"
79 | }
80 |
81 | .metro .icon-spades:before {
82 | content: "\e009"
83 | }
84 |
85 | .metro .icon-clubs:before {
86 | content: "\e00a"
87 | }
88 |
89 | .metro .icon-diamonds:before {
90 | content: "\e00b"
91 | }
92 |
93 | .metro .icon-broadcast:before {
94 | content: "\e00c"
95 | }
96 |
97 | .metro .icon-mic:before {
98 | content: "\e00d"
99 | }
100 |
101 | .metro .icon-book:before {
102 | content: "\e00e"
103 | }
104 |
105 | .metro .icon-file:before {
106 | content: "\e00f"
107 | }
108 |
109 | .metro .icon-new:before {
110 | content: "\e010"
111 | }
112 |
113 | .metro .icon-copy:before {
114 | content: "\e011"
115 | }
116 |
117 | .metro .icon-folder:before {
118 | content: "\e012"
119 | }
120 |
121 | .metro .icon-folder-2:before {
122 | content: "\e013"
123 | }
124 |
125 | .metro .icon-tag:before {
126 | content: "\e014"
127 | }
128 |
129 | .metro .icon-cart:before {
130 | content: "\e015"
131 | }
132 |
133 | .metro .icon-basket:before {
134 | content: "\e016"
135 | }
136 |
137 | .metro .icon-calculate:before {
138 | content: "\e017"
139 | }
140 |
141 | .metro .icon-support:before {
142 | content: "\e018"
143 | }
144 |
145 | .metro .icon-phone:before {
146 | content: "\e019"
147 | }
148 |
149 | .metro .icon-mail:before {
150 | content: "\e01a"
151 | }
152 |
153 | .metro .icon-location:before {
154 | content: "\e01b"
155 | }
156 |
157 | .metro .icon-compass:before {
158 | content: "\e01c"
159 | }
160 |
161 | .metro .icon-history:before {
162 | content: "\e01d"
163 | }
164 |
165 | .metro .icon-clock:before {
166 | content: "\e01e"
167 | }
168 |
169 | .metro .icon-bell:before {
170 | content: "\e01f"
171 | }
172 |
173 | .metro .icon-calendar:before {
174 | content: "\e020"
175 | }
176 |
177 | .metro .icon-printer:before {
178 | content: "\e021"
179 | }
180 |
181 | .metro .icon-mouse:before {
182 | content: "\e022"
183 | }
184 |
185 | .metro .icon-screen:before {
186 | content: "\e023"
187 | }
188 |
189 | .metro .icon-laptop:before {
190 | content: "\e024"
191 | }
192 |
193 | .metro .icon-mobile:before {
194 | content: "\e025"
195 | }
196 |
197 | .metro .icon-cabinet:before {
198 | content: "\e026"
199 | }
200 |
201 | .metro .icon-drawer:before {
202 | content: "\e027"
203 | }
204 |
205 | .metro .icon-drawer-2:before {
206 | content: "\e028"
207 | }
208 |
209 | .metro .icon-box:before {
210 | content: "\e029"
211 | }
212 |
213 | .metro .icon-box-add:before {
214 | content: "\e02a"
215 | }
216 |
217 | .metro .icon-box-remove:before {
218 | content: "\e02b"
219 | }
220 |
221 | .metro .icon-download:before {
222 | content: "\e02c"
223 | }
224 |
225 | .metro .icon-upload:before {
226 | content: "\e02d"
227 | }
228 |
229 | .metro .icon-database:before {
230 | content: "\e02e"
231 | }
232 |
233 | .metro .icon-flip:before {
234 | content: "\e02f"
235 | }
236 |
237 | .metro .icon-flip-2:before {
238 | content: "\e030"
239 | }
240 |
241 | .metro .icon-undo:before {
242 | content: "\e031"
243 | }
244 |
245 | .metro .icon-redo:before {
246 | content: "\e032"
247 | }
248 |
249 | .metro .icon-forward:before {
250 | content: "\e033"
251 | }
252 |
253 | .metro .icon-reply:before {
254 | content: "\e034"
255 | }
256 |
257 | .metro .icon-reply-2:before {
258 | content: "\e035"
259 | }
260 |
261 | .metro .icon-comments:before {
262 | content: "\e036"
263 | }
264 |
265 | .metro .icon-comments-2:before {
266 | content: "\e037"
267 | }
268 |
269 | .metro .icon-comments-3:before {
270 | content: "\e038"
271 | }
272 |
273 | .metro .icon-comments-4:before {
274 | content: "\e039"
275 | }
276 |
277 | .metro .icon-comments-5:before {
278 | content: "\e03a"
279 | }
280 |
281 | .metro .icon-user:before {
282 | content: "\e03b"
283 | }
284 |
285 | .metro .icon-user-2:before {
286 | content: "\e03c"
287 | }
288 |
289 | .metro .icon-user-3:before {
290 | content: "\e03d"
291 | }
292 |
293 | .metro .icon-busy:before {
294 | content: "\e03e"
295 | }
296 |
297 | .metro .icon-loading:before {
298 | content: "\e03f"
299 | }
300 |
301 | .metro .icon-loading-2:before {
302 | content: "\e040"
303 | }
304 |
305 | .metro .icon-search:before {
306 | content: "\e041"
307 | }
308 |
309 | .metro .icon-zoom-in:before {
310 | content: "\e042"
311 | }
312 |
313 | .metro .icon-zoom-out:before {
314 | content: "\e043"
315 | }
316 |
317 | .metro .icon-key:before {
318 | content: "\e044"
319 | }
320 |
321 | .metro .icon-key-2:before {
322 | content: "\e045"
323 | }
324 |
325 | .metro .icon-locked:before {
326 | content: "\e046"
327 | }
328 |
329 | .metro .icon-unlocked:before {
330 | content: "\e047"
331 | }
332 |
333 | .metro .icon-wrench:before {
334 | content: "\e048"
335 | }
336 |
337 | .metro .icon-equalizer:before {
338 | content: "\e049"
339 | }
340 |
341 | .metro .icon-cog:before {
342 | content: "\e04a"
343 | }
344 |
345 | .metro .icon-pie:before {
346 | content: "\e04b"
347 | }
348 |
349 | .metro .icon-bars:before {
350 | content: "\e04c"
351 | }
352 |
353 | .metro .icon-stats-up:before {
354 | content: "\e04d"
355 | }
356 |
357 | .metro .icon-gift:before {
358 | content: "\e04e"
359 | }
360 |
361 | .metro .icon-trophy:before {
362 | content: "\e04f"
363 | }
364 |
365 | .metro .icon-diamond:before {
366 | content: "\e050"
367 | }
368 |
369 | .metro .icon-coffee:before {
370 | content: "\e051"
371 | }
372 |
373 | .metro .icon-rocket:before {
374 | content: "\e052"
375 | }
376 |
377 | .metro .icon-meter-slow:before {
378 | content: "\e053"
379 | }
380 |
381 | .metro .icon-meter-medium:before {
382 | content: "\e054"
383 | }
384 |
385 | .metro .icon-meter-fast:before {
386 | content: "\e055"
387 | }
388 |
389 | .metro .icon-dashboard:before {
390 | content: "\e056"
391 | }
392 |
393 | .metro .icon-fire:before {
394 | content: "\e057"
395 | }
396 |
397 | .metro .icon-lab:before {
398 | content: "\e058"
399 | }
400 |
401 | .metro .icon-remove:before {
402 | content: "\e059"
403 | }
404 |
405 | .metro .icon-briefcase:before {
406 | content: "\e05a"
407 | }
408 |
409 | .metro .icon-briefcase-2:before {
410 | content: "\e05b"
411 | }
412 |
413 | .metro .icon-cars:before {
414 | content: "\e05c"
415 | }
416 |
417 | .metro .icon-bus:before {
418 | content: "\e05d"
419 | }
420 |
421 | .metro .icon-cube:before {
422 | content: "\e05e"
423 | }
424 |
425 | .metro .icon-cube-2:before {
426 | content: "\e05f"
427 | }
428 |
429 | .metro .icon-puzzle:before {
430 | content: "\e060"
431 | }
432 |
433 | .metro .icon-glasses:before {
434 | content: "\e061"
435 | }
436 |
437 | .metro .icon-glasses-2:before {
438 | content: "\e062"
439 | }
440 |
441 | .metro .icon-accessibility:before {
442 | content: "\e063"
443 | }
444 |
445 | .metro .icon-accessibility-2:before {
446 | content: "\e064"
447 | }
448 |
449 | .metro .icon-target:before {
450 | content: "\e065"
451 | }
452 |
453 | .metro .icon-target-2:before {
454 | content: "\e066"
455 | }
456 |
457 | .metro .icon-lightning:before {
458 | content: "\e067"
459 | }
460 |
461 | .metro .icon-power:before {
462 | content: "\e068"
463 | }
464 |
465 | .metro .icon-power-2:before {
466 | content: "\e069"
467 | }
468 |
469 | .metro .icon-clipboard:before {
470 | content: "\e06a"
471 | }
472 |
473 | .metro .icon-clipboard-2:before {
474 | content: "\e06b"
475 | }
476 |
477 | .metro .icon-playlist:before {
478 | content: "\e06c"
479 | }
480 |
481 | .metro .icon-grid-view:before {
482 | content: "\e06d"
483 | }
484 |
485 | .metro .icon-tree-view:before {
486 | content: "\e06e"
487 | }
488 |
489 | .metro .icon-cloud:before {
490 | content: "\e06f"
491 | }
492 |
493 | .metro .icon-cloud-2:before {
494 | content: "\e070"
495 | }
496 |
497 | .metro .icon-download-2:before {
498 | content: "\e071"
499 | }
500 |
501 | .metro .icon-upload-2:before {
502 | content: "\e072"
503 | }
504 |
505 | .metro .icon-upload-3:before {
506 | content: "\e073"
507 | }
508 |
509 | .metro .icon-link:before {
510 | content: "\e074"
511 | }
512 |
513 | .metro .icon-link-2:before {
514 | content: "\e075"
515 | }
516 |
517 | .metro .icon-flag:before {
518 | content: "\e076"
519 | }
520 |
521 | .metro .icon-flag-2:before {
522 | content: "\e077"
523 | }
524 |
525 | .metro .icon-attachment:before {
526 | content: "\e078"
527 | }
528 |
529 | .metro .icon-eye:before {
530 | content: "\e079"
531 | }
532 |
533 | .metro .icon-bookmark:before {
534 | content: "\e07a"
535 | }
536 |
537 | .metro .icon-bookmark-2:before {
538 | content: "\e07b"
539 | }
540 |
541 | .metro .icon-star:before {
542 | content: "\e07c"
543 | }
544 |
545 | .metro .icon-star-2:before {
546 | content: "\e07d"
547 | }
548 |
549 | .metro .icon-star-3:before {
550 | content: "\e07e"
551 | }
552 |
553 | .metro .icon-heart:before {
554 | content: "\e07f"
555 | }
556 |
557 | .metro .icon-heart-2:before {
558 | content: "\e080"
559 | }
560 |
561 | .metro .icon-thumbs-up:before {
562 | content: "\e081"
563 | }
564 |
565 | .metro .icon-thumbs-down:before {
566 | content: "\e082"
567 | }
568 |
569 | .metro .icon-plus:before {
570 | content: "\e083"
571 | }
572 |
573 | .metro .icon-minus:before {
574 | content: "\e084"
575 | }
576 |
577 | .metro .icon-help:before {
578 | content: "\e085"
579 | }
580 |
581 | .metro .icon-help-2:before {
582 | content: "\e086"
583 | }
584 |
585 | .metro .icon-blocked:before {
586 | content: "\e087"
587 | }
588 |
589 | .metro .icon-cancel:before {
590 | content: "\e088"
591 | }
592 |
593 | .metro .icon-cancel-2:before {
594 | content: "\e089"
595 | }
596 |
597 | .metro .icon-checkmark:before {
598 | content: "\e08a"
599 | }
600 |
601 | .metro .icon-minus-2:before {
602 | content: "\e08b"
603 | }
604 |
605 | .metro .icon-plus-2:before {
606 | content: "\e08c"
607 | }
608 |
609 | .metro .icon-enter:before {
610 | content: "\e08d"
611 | }
612 |
613 | .metro .icon-exit:before {
614 | content: "\e08e"
615 | }
616 |
617 | .metro .icon-loop:before {
618 | content: "\e08f"
619 | }
620 |
621 | .metro .icon-arrow-up-left:before {
622 | content: "\e090"
623 | }
624 |
625 | .metro .icon-arrow-up:before {
626 | content: "\e091"
627 | }
628 |
629 | .metro .icon-arrow-up-right:before {
630 | content: "\e092"
631 | }
632 |
633 | .metro .icon-arrow-right:before {
634 | content: "\e093"
635 | }
636 |
637 | .metro .icon-arrow-down-right:before {
638 | content: "\e094"
639 | }
640 |
641 | .metro .icon-arrow-down:before {
642 | content: "\e095"
643 | }
644 |
645 | .metro .icon-arrow-down-left:before {
646 | content: "\e096"
647 | }
648 |
649 | .metro .icon-arrow-left:before {
650 | content: "\e097"
651 | }
652 |
653 | .metro .icon-arrow-up-2:before {
654 | content: "\e098"
655 | }
656 |
657 | .metro .icon-arrow-right-2:before {
658 | content: "\e099"
659 | }
660 |
661 | .metro .icon-arrow-down-2:before {
662 | content: "\e09a"
663 | }
664 |
665 | .metro .icon-arrow-left-2:before {
666 | content: "\e09b"
667 | }
668 |
669 | .metro .icon-arrow-up-3:before {
670 | content: "\e09c"
671 | }
672 |
673 | .metro .icon-arrow-right-3:before {
674 | content: "\e09d"
675 | }
676 |
677 | .metro .icon-arrow-down-3:before {
678 | content: "\e09e"
679 | }
680 |
681 | .metro .icon-arrow-left-3:before {
682 | content: "\e09f"
683 | }
684 |
685 | .metro .icon-menu:before {
686 | content: "\e0a0"
687 | }
688 |
689 | .metro .icon-enter-2:before {
690 | content: "\e0a1"
691 | }
692 |
693 | .metro .icon-backspace:before {
694 | content: "\e0a2"
695 | }
696 |
697 | .metro .icon-backspace-2:before {
698 | content: "\e0a3"
699 | }
700 |
701 | .metro .icon-tab:before {
702 | content: "\e0a4"
703 | }
704 |
705 | .metro .icon-tab-2:before {
706 | content: "\e0a5"
707 | }
708 |
709 | .metro .icon-checkbox:before {
710 | content: "\e0a6"
711 | }
712 |
713 | .metro .icon-checkbox-unchecked:before {
714 | content: "\e0a7"
715 | }
716 |
717 | .metro .icon-checkbox-partial:before {
718 | content: "\e0a8"
719 | }
720 |
721 | .metro .icon-radio-checked:before {
722 | content: "\e0a9"
723 | }
724 |
725 | .metro .icon-radio-unchecked:before {
726 | content: "\e0aa"
727 | }
728 |
729 | .metro .icon-font:before {
730 | content: "\e0ab"
731 | }
732 |
733 | .metro .icon-paragraph-left:before {
734 | content: "\e0ac"
735 | }
736 |
737 | .metro .icon-paragraph-center:before {
738 | content: "\e0ad"
739 | }
740 |
741 | .metro .icon-paragraph-right:before {
742 | content: "\e0ae"
743 | }
744 |
745 | .metro .icon-paragraph-justify:before {
746 | content: "\e0af"
747 | }
748 |
749 | .metro .icon-left-to-right:before {
750 | content: "\e0b0"
751 | }
752 |
753 | .metro .icon-right-to-left:before {
754 | content: "\e0b1"
755 | }
756 |
757 | .metro .icon-share:before {
758 | content: "\e0b2"
759 | }
760 |
761 | .metro .icon-new-tab:before {
762 | content: "\e0b3"
763 | }
764 |
765 | .metro .icon-new-tab-2:before {
766 | content: "\e0b4"
767 | }
768 |
769 | .metro .icon-embed:before {
770 | content: "\e0b5"
771 | }
772 |
773 | .metro .icon-code:before {
774 | content: "\e0b6"
775 | }
776 |
777 | .metro .icon-bluetooth:before {
778 | content: "\e0b7"
779 | }
780 |
781 | .metro .icon-share-2:before {
782 | content: "\e0b8"
783 | }
784 |
785 | .metro .icon-share-3:before {
786 | content: "\e0b9"
787 | }
788 |
789 | .metro .icon-mail-2:before {
790 | content: "\e0ba"
791 | }
792 |
793 | .metro .icon-google:before {
794 | content: "\e0bb"
795 | }
796 |
797 | .metro .icon-google-plus:before {
798 | content: "\e0bc"
799 | }
800 |
801 | .metro .icon-google-drive:before {
802 | content: "\e0bd"
803 | }
804 |
805 | .metro .icon-facebook:before {
806 | content: "\e0be"
807 | }
808 |
809 | .metro .icon-instagram:before {
810 | content: "\e0bf"
811 | }
812 |
813 | .metro .icon-twitter:before {
814 | content: "\e0c0"
815 | }
816 |
817 | .metro .icon-feed:before {
818 | content: "\e0c1"
819 | }
820 |
821 | .metro .icon-youtube:before {
822 | content: "\e0c2"
823 | }
824 |
825 | .metro .icon-vimeo:before {
826 | content: "\e0c3"
827 | }
828 |
829 | .metro .icon-flickr:before {
830 | content: "\e0c4"
831 | }
832 |
833 | .metro .icon-picassa:before {
834 | content: "\e0c5"
835 | }
836 |
837 | .metro .icon-dribbble:before {
838 | content: "\e0c6"
839 | }
840 |
841 | .metro .icon-deviantart:before {
842 | content: "\e0c7"
843 | }
844 |
845 | .metro .icon-github:before {
846 | content: "\e0c8"
847 | }
848 |
849 | .metro .icon-github-2:before {
850 | content: "\e0c9"
851 | }
852 |
853 | .metro .icon-github-3:before {
854 | content: "\e0ca"
855 | }
856 |
857 | .metro .icon-github-4:before {
858 | content: "\e0cb"
859 | }
860 |
861 | .metro .icon-github-5:before {
862 | content: "\e0cc"
863 | }
864 |
865 | .metro .icon-git:before {
866 | content: "\e0cd"
867 | }
868 |
869 | .metro .icon-github-6:before {
870 | content: "\e0ce"
871 | }
872 |
873 | .metro .icon-wordpress:before {
874 | content: "\e0cf"
875 | }
876 |
877 | .metro .icon-joomla:before {
878 | content: "\e0d0"
879 | }
880 |
881 | .metro .icon-blogger:before {
882 | content: "\e0d1"
883 | }
884 |
885 | .metro .icon-tumblr:before {
886 | content: "\e0d2"
887 | }
888 |
889 | .metro .icon-yahoo:before {
890 | content: "\e0d3"
891 | }
892 |
893 | .metro .icon-amazon:before {
894 | content: "\e0d4"
895 | }
896 |
897 | .metro .icon-tux:before {
898 | content: "\e0d5"
899 | }
900 |
901 | .metro .icon-apple:before {
902 | content: "\e0d6"
903 | }
904 |
905 | .metro .icon-finder:before {
906 | content: "\e0d7"
907 | }
908 |
909 | .metro .icon-android:before {
910 | content: "\e0d8"
911 | }
912 |
913 | .metro .icon-windows:before {
914 | content: "\e0d9"
915 | }
916 |
917 | .metro .icon-soundcloud:before {
918 | content: "\e0da"
919 | }
920 |
921 | .metro .icon-skype:before {
922 | content: "\e0db"
923 | }
924 |
925 | .metro .icon-reddit:before {
926 | content: "\e0dc"
927 | }
928 |
929 | .metro .icon-linkedin:before {
930 | content: "\e0dd"
931 | }
932 |
933 | .metro .icon-lastfm:before {
934 | content: "\e0de"
935 | }
936 |
937 | .metro .icon-delicious:before {
938 | content: "\e0df"
939 | }
940 |
941 | .metro .icon-stumbleupon:before {
942 | content: "\e0e0"
943 | }
944 |
945 | .metro .icon-pinterest:before {
946 | content: "\e0e1"
947 | }
948 |
949 | .metro .icon-xing:before {
950 | content: "\e0e2"
951 | }
952 |
953 | .metro .icon-flattr:before {
954 | content: "\e0e3"
955 | }
956 |
957 | .metro .icon-foursquare:before {
958 | content: "\e0e4"
959 | }
960 |
961 | .metro .icon-paypal:before {
962 | content: "\e0e5"
963 | }
964 |
965 | .metro .icon-yelp:before {
966 | content: "\e0e6"
967 | }
968 |
969 | .metro .icon-libreoffice:before {
970 | content: "\e0e7"
971 | }
972 |
973 | .metro .icon-file-pdf:before {
974 | content: "\e0e8"
975 | }
976 |
977 | .metro .icon-file-openoffice:before {
978 | content: "\e0e9"
979 | }
980 |
981 | .metro .icon-file-word:before {
982 | content: "\e0ea"
983 | }
984 |
985 | .metro .icon-file-excel:before {
986 | content: "\e0eb"
987 | }
988 |
989 | .metro .icon-file-powerpoint:before {
990 | content: "\e0ec"
991 | }
992 |
993 | .metro .icon-file-zip:before {
994 | content: "\e0ed"
995 | }
996 |
997 | .metro .icon-file-xml:before {
998 | content: "\e0ee"
999 | }
1000 |
1001 | .metro .icon-file-css:before {
1002 | content: "\e0ef"
1003 | }
1004 |
1005 | .metro .icon-html5:before {
1006 | content: "\e0f0"
1007 | }
1008 |
1009 | .metro .icon-html5-2:before {
1010 | content: "\e0f1"
1011 | }
1012 |
1013 | .metro .icon-css3:before {
1014 | content: "\e0f2"
1015 | }
1016 |
1017 | .metro .icon-chrome:before {
1018 | content: "\e0f3"
1019 | }
1020 |
1021 | .metro .icon-firefox:before {
1022 | content: "\e0f4"
1023 | }
1024 |
1025 | .metro .icon-IE:before {
1026 | content: "\e0f5"
1027 | }
1028 |
1029 | .metro .icon-opera:before {
1030 | content: "\e0f6"
1031 | }
1032 |
1033 | .metro .icon-safari:before {
1034 | content: "\e0f7"
1035 | }
1036 |
1037 | .metro .icon-IcoMoon:before {
1038 | content: "\e0f8"
1039 | }
1040 |
1041 | .metro .icon-sunrise:before {
1042 | content: "\e0f9"
1043 | }
1044 |
1045 | .metro .icon-sun:before {
1046 | content: "\e0fa"
1047 | }
1048 |
1049 | .metro .icon-moon:before {
1050 | content: "\e0fb"
1051 | }
1052 |
1053 | .metro .icon-sun-2:before {
1054 | content: "\e0fc"
1055 | }
1056 |
1057 | .metro .icon-windy:before {
1058 | content: "\e0fd"
1059 | }
1060 |
1061 | .metro .icon-wind:before {
1062 | content: "\e0fe"
1063 | }
1064 |
1065 | .metro .icon-snowflake:before {
1066 | content: "\e0ff"
1067 | }
1068 |
1069 | .metro .icon-cloudy:before {
1070 | content: "\e100"
1071 | }
1072 |
1073 | .metro .icon-cloud-3:before {
1074 | content: "\e101"
1075 | }
1076 |
1077 | .metro .icon-weather:before {
1078 | content: "\e102"
1079 | }
1080 |
1081 | .metro .icon-weather-2:before {
1082 | content: "\e103"
1083 | }
1084 |
1085 | .metro .icon-weather-3:before {
1086 | content: "\e104"
1087 | }
1088 |
1089 | .metro .icon-lines:before {
1090 | content: "\e105"
1091 | }
1092 |
1093 | .metro .icon-cloud-4:before {
1094 | content: "\e106"
1095 | }
1096 |
1097 | .metro .icon-lightning-2:before {
1098 | content: "\e107"
1099 | }
1100 |
1101 | .metro .icon-lightning-3:before {
1102 | content: "\e108"
1103 | }
1104 |
1105 | .metro .icon-rainy:before {
1106 | content: "\e109"
1107 | }
1108 |
1109 | .metro .icon-rainy-2:before {
1110 | content: "\e10a"
1111 | }
1112 |
1113 | .metro .icon-windy-2:before {
1114 | content: "\e10b"
1115 | }
1116 |
1117 | .metro .icon-windy-3:before {
1118 | content: "\e10c"
1119 | }
1120 |
1121 | .metro .icon-snowy:before {
1122 | content: "\e10d"
1123 | }
1124 |
1125 | .metro .icon-snowy-2:before {
1126 | content: "\e10e"
1127 | }
1128 |
1129 | .metro .icon-snowy-3:before {
1130 | content: "\e10f"
1131 | }
1132 |
1133 | .metro .icon-weather-4:before {
1134 | content: "\e110"
1135 | }
1136 |
1137 | .metro .icon-cloudy-2:before {
1138 | content: "\e111"
1139 | }
1140 |
1141 | .metro .icon-cloud-5:before {
1142 | content: "\e112"
1143 | }
1144 |
1145 | .metro .icon-lightning-4:before {
1146 | content: "\e113"
1147 | }
1148 |
1149 | .metro .icon-sun-3:before {
1150 | content: "\e114"
1151 | }
1152 |
1153 | .metro .icon-moon-2:before {
1154 | content: "\e115"
1155 | }
1156 |
1157 | .metro .icon-cloudy-3:before {
1158 | content: "\e116"
1159 | }
1160 |
1161 | .metro .icon-cloud-6:before {
1162 | content: "\e117"
1163 | }
1164 |
1165 | .metro .icon-cloud-7:before {
1166 | content: "\e118"
1167 | }
1168 |
1169 | .metro .icon-lightning-5:before {
1170 | content: "\e119"
1171 | }
1172 |
1173 | .metro .icon-rainy-3:before {
1174 | content: "\e11a"
1175 | }
1176 |
1177 | .metro .icon-rainy-4:before {
1178 | content: "\e11b"
1179 | }
1180 |
1181 | .metro .icon-windy-4:before {
1182 | content: "\e11c"
1183 | }
1184 |
1185 | .metro .icon-windy-5:before {
1186 | content: "\e11d"
1187 | }
1188 |
1189 | .metro .icon-snowy-4:before {
1190 | content: "\e11e"
1191 | }
1192 |
1193 | .metro .icon-snowy-5:before {
1194 | content: "\e11f"
1195 | }
1196 |
1197 | .metro .icon-weather-5:before {
1198 | content: "\e120"
1199 | }
1200 |
1201 | .metro .icon-cloudy-4:before {
1202 | content: "\e121"
1203 | }
1204 |
1205 | .metro .icon-lightning-6:before {
1206 | content: "\e122"
1207 | }
1208 |
1209 | .metro .icon-thermometer:before {
1210 | content: "\e123"
1211 | }
1212 |
1213 | .metro .icon-compass-2:before {
1214 | content: "\e124"
1215 | }
1216 |
1217 | .metro .icon-none:before {
1218 | content: "\e125"
1219 | }
1220 |
1221 | .metro .icon-Celsius:before {
1222 | content: "\e126"
1223 | }
1224 |
1225 | .metro .icon-Fahrenheit:before {
1226 | content: "\e127"
1227 | }
1228 |
1229 | .metro .icon-forrst:before {
1230 | content: "\e128"
1231 | }
1232 |
1233 | .metro .icon-headphones:before {
1234 | content: "\e129"
1235 | }
1236 |
1237 | .metro .icon-bug:before {
1238 | content: "\e12a"
1239 | }
1240 |
1241 | .metro .icon-cart-2:before {
1242 | content: "\e12b"
1243 | }
1244 |
1245 | .metro .icon-earth:before {
1246 | content: "\e12c"
1247 | }
1248 |
1249 | .metro .icon-battery:before {
1250 | content: "\e12d"
1251 | }
1252 |
1253 | .metro .icon-list:before {
1254 | content: "\e12e"
1255 | }
1256 |
1257 | .metro .icon-grid:before {
1258 | content: "\e12f"
1259 | }
1260 |
1261 | .metro .icon-alarm:before {
1262 | content: "\e130"
1263 | }
1264 |
1265 | .metro .icon-location-2:before {
1266 | content: "\e131"
1267 | }
1268 |
1269 | .metro .icon-pointer:before {
1270 | content: "\e132"
1271 | }
1272 |
1273 | .metro .icon-diary:before {
1274 | content: "\e133"
1275 | }
1276 |
1277 | .metro .icon-eye-2:before {
1278 | content: "\e134"
1279 | }
1280 |
1281 | .metro .icon-console:before {
1282 | content: "\e135"
1283 | }
1284 |
1285 | .metro .icon-location-3:before {
1286 | content: "\e136"
1287 | }
1288 |
1289 | .metro .icon-move:before {
1290 | content: "\e137"
1291 | }
1292 |
1293 | .metro .icon-gift-2:before {
1294 | content: "\e138"
1295 | }
1296 |
1297 | .metro .icon-monitor:before {
1298 | content: "\e139"
1299 | }
1300 |
1301 | .metro .icon-mobile-2:before {
1302 | content: "\e13a"
1303 | }
1304 |
1305 | .metro .icon-switch:before {
1306 | content: "\e13b"
1307 | }
1308 |
1309 | .metro .icon-star-4:before {
1310 | content: "\e13c"
1311 | }
1312 |
1313 | .metro .icon-address-book:before {
1314 | content: "\e13d"
1315 | }
1316 |
1317 | .metro .icon-shit:before {
1318 | content: "\e13e"
1319 | }
1320 |
1321 | .metro .icon-cone:before {
1322 | content: "\e13f"
1323 | }
1324 |
1325 | .metro .icon-credit-card:before {
1326 | content: "\e140"
1327 | }
1328 |
1329 | .metro .icon-type:before {
1330 | content: "\e141"
1331 | }
1332 |
1333 | .metro .icon-volume:before {
1334 | content: "\e142"
1335 | }
1336 |
1337 | .metro .icon-volume-2:before {
1338 | content: "\e143"
1339 | }
1340 |
1341 | .metro .icon-locked-2:before {
1342 | content: "\e144"
1343 | }
1344 |
1345 | .metro .icon-warning:before {
1346 | content: "\e145"
1347 | }
1348 |
1349 | .metro .icon-info:before {
1350 | content: "\e146"
1351 | }
1352 |
1353 | .metro .icon-filter:before {
1354 | content: "\e147"
1355 | }
1356 |
1357 | .metro .icon-bookmark-3:before {
1358 | content: "\e148"
1359 | }
1360 |
1361 | .metro .icon-bookmark-4:before {
1362 | content: "\e149"
1363 | }
1364 |
1365 | .metro .icon-stats:before {
1366 | content: "\e14a"
1367 | }
1368 |
1369 | .metro .icon-compass-3:before {
1370 | content: "\e14b"
1371 | }
1372 |
1373 | .metro .icon-keyboard:before {
1374 | content: "\e14c"
1375 | }
1376 |
1377 | .metro .icon-award-fill:before {
1378 | content: "\e14d"
1379 | }
1380 |
1381 | .metro .icon-award-stroke:before {
1382 | content: "\e14e"
1383 | }
1384 |
1385 | .metro .icon-beaker-alt:before {
1386 | content: "\e14f"
1387 | }
1388 |
1389 | .metro .icon-beaker:before {
1390 | content: "\e150"
1391 | }
1392 |
1393 | .metro .icon-move-vertical:before {
1394 | content: "\e151"
1395 | }
1396 |
1397 | .metro .icon-move-horizontal:before {
1398 | content: "\e152"
1399 | }
1400 |
1401 | .metro .icon-steering-wheel:before {
1402 | content: "\e153"
1403 | }
1404 |
1405 | .metro .icon-volume-3:before {
1406 | content: "\e154"
1407 | }
1408 |
1409 | .metro .icon-volume-mute:before {
1410 | content: "\e155"
1411 | }
1412 |
1413 | .metro .icon-play:before {
1414 | content: "\e156"
1415 | }
1416 |
1417 | .metro .icon-pause:before {
1418 | content: "\e157"
1419 | }
1420 |
1421 | .metro .icon-stop:before {
1422 | content: "\e158"
1423 | }
1424 |
1425 | .metro .icon-eject:before {
1426 | content: "\e159"
1427 | }
1428 |
1429 | .metro .icon-first:before {
1430 | content: "\e15a"
1431 | }
1432 |
1433 | .metro .icon-last:before {
1434 | content: "\e15b"
1435 | }
1436 |
1437 | .metro .icon-play-alt:before {
1438 | content: "\e15c"
1439 | }
1440 |
1441 | .metro .icon-battery-charging:before {
1442 | content: "\e160"
1443 | }
1444 |
1445 | .metro .icon-left-quote:before {
1446 | content: "\e161"
1447 | }
1448 |
1449 | .metro .icon-right-quote:before {
1450 | content: "\e162"
1451 | }
1452 |
1453 | .metro .icon-left-quote-alt:before {
1454 | content: "\e163"
1455 | }
1456 |
1457 | .metro .icon-right-quote-alt:before {
1458 | content: "\e164"
1459 | }
1460 |
1461 | .metro .icon-smiley:before {
1462 | content: "\e165"
1463 | }
1464 |
1465 | .metro .icon-umbrella:before {
1466 | content: "\e166"
1467 | }
1468 |
1469 | .metro .icon-info-2:before {
1470 | content: "\e167"
1471 | }
1472 |
1473 | .metro .icon-chart-alt:before {
1474 | content: "\e168"
1475 | }
1476 |
1477 | .metro .icon-at:before {
1478 | content: "\e169"
1479 | }
1480 |
1481 | .metro .icon-hash:before {
1482 | content: "\e16a"
1483 | }
1484 |
1485 | .metro .icon-pilcrow:before {
1486 | content: "\e16b"
1487 | }
1488 |
1489 | .metro .icon-fullscreen-alt:before {
1490 | content: "\e16c"
1491 | }
1492 |
1493 | .metro .icon-fullscreen-exit-alt:before {
1494 | content: "\e16d"
1495 | }
1496 |
1497 | .metro .icon-layers-alt:before {
1498 | content: "\e16e"
1499 | }
1500 |
1501 | .metro .icon-layers:before {
1502 | content: "\e16f"
1503 | }
1504 |
1505 | .metro .icon-floppy:before {
1506 | content: "\e170"
1507 | }
1508 |
1509 | .metro .icon-rainbow:before {
1510 | content: "\e000"
1511 | }
1512 |
1513 | .metro .icon-air:before {
1514 | content: "\e171"
1515 | }
1516 |
1517 | .metro .icon-home:before {
1518 | content: "\e172"
1519 | }
1520 |
1521 | .metro .icon-spin:before {
1522 | content: "\e173"
1523 | }
1524 |
1525 | .metro .icon-auction:before {
1526 | content: "\e174"
1527 | }
1528 |
1529 | .metro .icon-dollar:before {
1530 | content: "\e175"
1531 | }
1532 |
1533 | .metro .icon-dollar-2:before {
1534 | content: "\e176"
1535 | }
1536 |
1537 | .metro .icon-coins:before {
1538 | content: "\e177"
1539 | }
1540 |
1541 | .metro .icon-file-2:before {
1542 | content: "\e186"
1543 | }
1544 |
1545 | .metro .icon-file-3:before {
1546 | content: "\e187"
1547 | }
1548 |
1549 | .metro .icon-file-4:before {
1550 | content: "\e188"
1551 | }
1552 |
1553 | .metro .icon-files:before {
1554 | content: "\e189"
1555 | }
1556 |
1557 | .metro .icon-phone-2:before {
1558 | content: "\e18a"
1559 | }
1560 |
1561 | .metro .icon-tablet:before {
1562 | content: "\e18b"
1563 | }
1564 |
1565 | .metro .icon-monitor-2:before {
1566 | content: "\e18c"
1567 | }
1568 |
1569 | .metro .icon-window:before {
1570 | content: "\e18d"
1571 | }
1572 |
1573 | .metro .icon-tv:before {
1574 | content: "\e18e"
1575 | }
1576 |
1577 | .metro .icon-camera-3:before {
1578 | content: "\e18f"
1579 | }
1580 |
1581 | .metro .icon-image:before {
1582 | content: "\e190"
1583 | }
1584 |
1585 | .metro .icon-open:before {
1586 | content: "\e191"
1587 | }
1588 |
1589 | .metro .icon-sale:before {
1590 | content: "\e192"
1591 | }
1592 |
1593 | .metro .icon-direction:before {
1594 | content: "\e193"
1595 | }
1596 |
1597 | .metro .icon-medal:before {
1598 | content: "\e194"
1599 | }
1600 |
1601 | .metro .icon-medal-2:before {
1602 | content: "\e195"
1603 | }
1604 |
1605 | .metro .icon-satellite:before {
1606 | content: "\e196"
1607 | }
1608 |
1609 | .metro .icon-discout:before {
1610 | content: "\e197"
1611 | }
1612 |
1613 | .metro .icon-barcode:before {
1614 | content: "\e198"
1615 | }
1616 |
1617 | .metro .icon-ticket:before {
1618 | content: "\e199"
1619 | }
1620 |
1621 | .metro .icon-shipping:before {
1622 | content: "\e19a"
1623 | }
1624 |
1625 | .metro .icon-globe:before {
1626 | content: "\e19b"
1627 | }
1628 |
1629 | .metro .icon-anchor:before {
1630 | content: "\e19c"
1631 | }
1632 |
1633 | .metro .icon-pop-out:before {
1634 | content: "\e19d"
1635 | }
1636 |
1637 | .metro .icon-pop-in:before {
1638 | content: "\e19e"
1639 | }
1640 |
1641 | .metro .icon-resize:before {
1642 | content: "\e178"
1643 | }
1644 |
1645 | .metro .icon-battery-2:before {
1646 | content: "\e179"
1647 | }
1648 |
1649 | .metro .icon-battery-3:before {
1650 | content: "\e17a"
1651 | }
1652 |
1653 | .metro .icon-battery-4:before {
1654 | content: "\e17b"
1655 | }
1656 |
1657 | .metro .icon-battery-5:before {
1658 | content: "\e17c"
1659 | }
1660 |
1661 | .metro .icon-tools:before {
1662 | content: "\e17d"
1663 | }
1664 |
1665 | .metro .icon-alarm-2:before {
1666 | content: "\e17e"
1667 | }
1668 |
1669 | .metro .icon-alarm-cancel:before {
1670 | content: "\e17f"
1671 | }
1672 |
1673 | .metro .icon-alarm-clock:before {
1674 | content: "\e180"
1675 | }
1676 |
1677 | .metro .icon-chronometer:before {
1678 | content: "\e181"
1679 | }
1680 |
1681 | .metro .icon-ruler:before {
1682 | content: "\e182"
1683 | }
1684 |
1685 | .metro .icon-lamp:before {
1686 | content: "\e183"
1687 | }
1688 |
1689 | .metro .icon-lamp-2:before {
1690 | content: "\e184"
1691 | }
1692 |
1693 | .metro .icon-scissors:before {
1694 | content: "\e185"
1695 | }
1696 |
1697 | .metro .icon-volume-4:before {
1698 | content: "\e19f"
1699 | }
1700 |
1701 | .metro .icon-volume-5:before {
1702 | content: "\e1a0"
1703 | }
1704 |
1705 | .metro .icon-volume-6:before {
1706 | content: "\e1a1"
1707 | }
1708 |
1709 | .metro .icon-battery-full:before {
1710 | content: "\e15f"
1711 | }
1712 |
1713 | .metro .icon-battery-empty:before {
1714 | content: "\e15d"
1715 | }
1716 |
1717 | .metro .icon-battery-half:before {
1718 | content: "\e15e"
1719 | }
1720 |
1721 | .metro .icon-zip:before {
1722 | content: "\e1a2"
1723 | }
1724 |
1725 | .metro .icon-zip-2:before {
1726 | content: "\e1a3"
1727 | }
1728 |
1729 | .metro .icon-play-2:before {
1730 | content: "\e1a4"
1731 | }
1732 |
1733 | .metro .icon-pause-2:before {
1734 | content: "\e1a5"
1735 | }
1736 |
1737 | .metro .icon-record:before {
1738 | content: "\e1a6"
1739 | }
1740 |
1741 | .metro .icon-stop-2:before {
1742 | content: "\e1a7"
1743 | }
1744 |
1745 | .metro .icon-next:before {
1746 | content: "\e1a8"
1747 | }
1748 |
1749 | .metro .icon-previous:before {
1750 | content: "\e1a9"
1751 | }
1752 |
1753 | .metro .icon-first-2:before {
1754 | content: "\e1aa"
1755 | }
1756 |
1757 | .metro .icon-last-2:before {
1758 | content: "\e1ab"
1759 | }
1760 |
1761 | .metro .icon-arrow-left-4:before {
1762 | content: "\e1ac"
1763 | }
1764 |
1765 | .metro .icon-arrow-down-4:before {
1766 | content: "\e1ad"
1767 | }
1768 |
1769 | .metro .icon-arrow-up-4:before {
1770 | content: "\e1ae"
1771 | }
1772 |
1773 | .metro .icon-arrow-right-4:before {
1774 | content: "\e1af"
1775 | }
1776 |
1777 | .metro .icon-arrow-left-5:before {
1778 | content: "\e1b0"
1779 | }
1780 |
1781 | .metro .icon-arrow-down-5:before {
1782 | content: "\e1b1"
1783 | }
1784 |
1785 | .metro .icon-arrow-up-5:before {
1786 | content: "\e1b2"
1787 | }
1788 |
1789 | .metro .icon-arrow-right-5:before {
1790 | content: "\e1b3"
1791 | }
1792 |
1793 | .metro .icon-cc:before {
1794 | content: "\e1b4"
1795 | }
1796 |
1797 | .metro .icon-cc-by:before {
1798 | content: "\e1b5"
1799 | }
1800 |
1801 | .metro .icon-cc-nc:before {
1802 | content: "\e1b6"
1803 | }
1804 |
1805 | .metro .icon-cc-nc-eu:before {
1806 | content: "\e1b7"
1807 | }
1808 |
1809 | .metro .icon-cc-nc-jp:before {
1810 | content: "\e1b8"
1811 | }
1812 |
1813 | .metro .icon-cc-sa:before {
1814 | content: "\e1b9"
1815 | }
1816 |
1817 | .metro .icon-cc-nd:before {
1818 | content: "\e1ba"
1819 | }
1820 |
1821 | .metro .icon-cc-pd:before {
1822 | content: "\e1bb"
1823 | }
1824 |
1825 | .metro .icon-cc-zero:before {
1826 | content: "\e1bc"
1827 | }
1828 |
1829 | .metro .icon-cc-share:before {
1830 | content: "\e1bd"
1831 | }
1832 |
1833 | .metro .icon-cc-share-2:before {
1834 | content: "\e1be"
1835 | }
1836 |
1837 | .metro .icon-cycle:before {
1838 | content: "\e1bf"
1839 | }
1840 |
1841 | .metro .icon-stop-3:before {
1842 | content: "\e1c0"
1843 | }
1844 |
1845 | .metro .icon-stats-2:before {
1846 | content: "\e1c1"
1847 | }
1848 |
1849 | .metro .icon-stats-3:before {
1850 | content: "\e1c2"
1851 | }
--------------------------------------------------------------------------------