Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
olton committed Feb 18, 2018
2 parents 439251a + cf82a20 commit 100070b
Show file tree
Hide file tree
Showing 29 changed files with 1,284 additions and 112 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.0.18
* add method isOpened for Dialog widget
* add method metroDialog.isDialog(el)

## 3.0.17
* fix hotkeys init error

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Welcome
The front-end framework for developing projects on the web in Windows Metro Style, created and supported by Sergey Pimenov (aka olton) with the massive support and involvement of community. Metro UI CSS developed with the advice of Microsoft to build the user interface and include: general styles, grid, layouts, typography, 20+ components, 300+ built-in icons. Metro UI CSS build with {LESS}. Metro UI CSS is open source and has MIT licensing model.

## Current Version 3.0.17
## Current Version 3.0.18

### Install with bower
bower install metro
Expand Down
7 changes: 7 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### 3.0.18
- [ ] recreate calendar
- [ ] time picker
- [ ] tile size for mobile
- [ ] windows manager


12 changes: 11 additions & 1 deletion build/css/metro.css
Original file line number Diff line number Diff line change
Expand Up @@ -10423,7 +10423,7 @@ input[type="submit"].link:active {
}
.panel > .content {
background-color: #e8f1f4;
z-index: 1;
z-index: auto;
font-size: 0.875rem;
}
.panel.collapsible > .heading {
Expand Down Expand Up @@ -11825,6 +11825,16 @@ input[type="submit"].link:active {
position: absolute;
box-shadow: inset 0 0 1px #FFFFCC;
}
.tile-content.slide-up > .slide-over,
.tile-content.slide-down > .slide-over,
.tile-content.slide-up-2 > .slide-over,
.tile-content.slide-down-2 > .slide-over,
.tile-content.slide-left > .slide-over,
.tile-content.slide-right > .slide-over,
.tile-content.slide-left-2 > .slide-over,
.tile-content.slide-right-2 > .slide-over {
box-shadow: none;
}
.tile-content.slide-up > .slide,
.tile-content.slide-down > .slide,
.tile-content.slide-up-2 > .slide,
Expand Down
2 changes: 1 addition & 1 deletion build/css/metro.min.css

Large diffs are not rendered by default.

76 changes: 52 additions & 24 deletions build/js/metro.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,19 @@ window.METRO_LOCALES = {
buttons: [
"Hari Ini", "Mengulang", "Batalkan", "Bantuan", "Sebelumnya", "Berikutnya", "Selesai"
]
},
'hu': {
months: [
'Január', 'Február', 'Március', 'Április', 'Május', 'Június', 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December',
'Jan', 'Febr', 'Márc', 'Ápr', 'Máj', 'Jún', 'Júl', 'Aug', 'Szept', 'Okt', 'Nov', 'Dec'
],
days: [
'Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat',
'V', 'H', 'K', 'Sz', 'Cs', 'P', 'Sz'
],
buttons: [
'Ma', 'Törlés', 'Mégse', 'Segítség', 'Előző', 'Következő', 'Vége'
]
}
};

Expand Down Expand Up @@ -2245,16 +2258,18 @@ $.widget("metro.accordion", {
//=== EVENTS =================================================

//activate the click event for the pull button
$(that.pullButton).on("click", function () {
$(that.pullButton).on("click", function (e) {

//who am i?
that = $(this).closest("[data-role=appbar]").data("appbar");

//we show /hide the pullmenu
if ($(that.pullMenu).is(":hidden")) {
if ($(that.pullMenu).length !== 0 && $(that.pullMenu).is(":hidden")) {
$(that.pullMenu).show();
$(that.pullMenu).find(".app-bar-pullmenubar")
.hide().not(".hidden").slideDown("fast");
e.preventDefault();
e.stopPropagation();
} else {
$(that.pullMenu).find(".app-bar-pullmenubar")
.not(".hidden").show().slideUp("fast", function () {
Expand Down Expand Up @@ -5243,6 +5258,10 @@ $.widget( "metro.dialog" , {
this._setContent();
},

isOpened: function(){
return this.element.data('opened') === true;
},

toggle: function(){
var element = this.element;
if (element.data('opened')) {
Expand Down Expand Up @@ -5334,7 +5353,7 @@ $.widget( "metro.dialog" , {


var dialog = {
open: function(el, place, content, contentType){
isDialog: function(el){
var dialog = $(el), dialog_obj;
if (dialog.length == 0) {
console.log('Dialog ' + el + ' not found!');
Expand All @@ -5348,6 +5367,16 @@ var dialog = {
return false;
}

return true;
},

open: function(el, place, content, contentType){
var dialog = $(el), dialog_obj = dialog.data('dialog');

if (!this.isDialog(el)) {
return false;
}

if (content != undefined) {
switch (contentType) {
case 'href': dialog_obj.setContentHref(content); break;
Expand All @@ -5364,33 +5393,19 @@ var dialog = {
},

close: function(el){
var dialog = $(el), dialog_obj;
if (dialog.length == 0) {
console.log('Dialog ' + el + ' not found!');
return false;
}

dialog_obj = dialog.data('dialog');
var dialog = $(el), dialog_obj = dialog.data('dialog');

if (dialog_obj == undefined) {
console.log('Element not contain role dialog! Please add attribute data-role="dialog" to element ' + el);
if (!this.isDialog(el)) {
return false;
}

dialog_obj.close();
},

toggle: function(el, place, content, contentType){
var dialog = $(el), dialog_obj;
if (dialog.length == 0) {
console.log('Dialog ' + el + ' not found!');
return false;
}
var dialog = $(el), dialog_obj = dialog.data('dialog');

dialog_obj = dialog.data('dialog');

if (dialog_obj == undefined) {
console.log('Element not contain role dialog! Please add attribute data-role="dialog" to element ' + el);
if (!this.isDialog(el)) {
return false;
}

Expand Down Expand Up @@ -5569,7 +5584,7 @@ $.widget( "metro.donut" , {
}

if (o.animate > 0) {
var i = 0;
var i = -1;
var interval;

interval = setInterval(function(){
Expand Down Expand Up @@ -5918,6 +5933,16 @@ $(document).on('click', function(e){
that._close(el);
}
});

var that = $("[data-role=appbar]").data("appbar");

//we show /hide the pullmenu
if ($(that.pullMenu).length !== 0 && $(that.pullMenu).not(":hidden")) {
$(that.pullMenu).find(".app-bar-pullmenubar")
.not(".hidden").show().slideUp("fast", function () {
$(that.pullMenu).hide();
});
}
});

// Source: js/widgets/fit-image.js
Expand Down Expand Up @@ -10079,7 +10104,7 @@ $.widget( "metro.video" , {
poster: false,
src: false,
loop: false,
preload: false,
preload: true,
autoplay: false,
muted: false,
volume:.5,
Expand Down Expand Up @@ -10110,7 +10135,7 @@ $.widget( "metro.video" , {
} else if (o.videoSize == 'SD' && o.videoSize == 'sd') {
player_height = 3 * player_width / 4;
} else {

player_height = 9 * player_width / 16;
}

element.addClass('video-player');
Expand Down Expand Up @@ -10179,11 +10204,14 @@ $.widget( "metro.video" , {
var video = element.find("video"), video_obj = video[0];

video.on('loadedmetadata', function(){
//console.log("loadedmetadata");
element.data('duration', video_obj.duration.toFixed(0));
info_box.html("00:00" + " / " + metroUtils.secondsToFormattedString(element.data('duration')) );
});

// Not fired in Chrome
video.on("canplay", function(){
//console.log("canplay");
controls.fadeIn();
preloader.hide();
var buffered = video_obj.buffered.length ? Math.round(Math.floor(video_obj.buffered.end(0)) / Math.floor(video_obj.duration) * 100) : 0;
Expand Down
14 changes: 8 additions & 6 deletions build/js/metro.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions commit.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
call git add .
call git commit -am %1
call git push
25 changes: 23 additions & 2 deletions docs/css/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ body {

.prettyprint {
background-color: #eeeeee;
border: 0 !important;
border-width: 1px !important;
border-color: #eeeeee !important;
border-left: 8px #555555 solid !important;
Expand All @@ -32,7 +31,7 @@ body {

.prettyprint {
overflow: hidden;
overflow-x: scroll;
overflow-x: auto;
}

.demo-grid .row > .cell {
Expand All @@ -53,6 +52,28 @@ body {
cursor: pointer;
}

#core_logo {
height: 100px;
width: 100px;
padding: 10px;
border-radius: 50%;
background: #fff;
border: 4px solid #1B6EAE;
float: left;
margin-right: 20px;
}


.ani-logo {
animation: core_spin 4s infinite linear;
}

@keyframes core_spin {
from {transform:rotate(0deg);}
to {transform:rotate(360deg);}
}


@media screen and (max-width: 800px) {
.app-bar.fixed-top {
position: relative !important;
Expand Down
12 changes: 11 additions & 1 deletion docs/css/metro.css
Original file line number Diff line number Diff line change
Expand Up @@ -10423,7 +10423,7 @@ input[type="submit"].link:active {
}
.panel > .content {
background-color: #e8f1f4;
z-index: 1;
z-index: auto;
font-size: 0.875rem;
}
.panel.collapsible > .heading {
Expand Down Expand Up @@ -11825,6 +11825,16 @@ input[type="submit"].link:active {
position: absolute;
box-shadow: inset 0 0 1px #FFFFCC;
}
.tile-content.slide-up > .slide-over,
.tile-content.slide-down > .slide-over,
.tile-content.slide-up-2 > .slide-over,
.tile-content.slide-down-2 > .slide-over,
.tile-content.slide-left > .slide-over,
.tile-content.slide-right > .slide-over,
.tile-content.slide-left-2 > .slide-over,
.tile-content.slide-right-2 > .slide-over {
box-shadow: none;
}
.tile-content.slide-up > .slide,
.tile-content.slide-down > .slide,
.tile-content.slide-up-2 > .slide,
Expand Down
54 changes: 54 additions & 0 deletions docs/images/Core_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 100070b

Please sign in to comment.