Commit 312fbde4 authored by techird's avatar techird

全屏支持兼容性修复

parent d862ef2f
...@@ -9,6 +9,18 @@ var path = require('path'); ...@@ -9,6 +9,18 @@ var path = require('path');
*-----------------------------------------------------*/ *-----------------------------------------------------*/
module.exports = function(grunt) { module.exports = function(grunt) {
// These plugins provide necessary tasks.
/* [Build plugin & task ] ------------------------------------*/
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-autoprefixer');
var banner = '/*!\n' + var banner = '/*!\n' +
' * ====================================================\n' + ' * ====================================================\n' +
' * <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + ' * <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
...@@ -131,7 +143,7 @@ module.exports = function(grunt) { ...@@ -131,7 +143,7 @@ module.exports = function(grunt) {
watch: { watch: {
less: { less: {
files: ['ui/theme/**/*.less'], files: ['ui/theme/**/*.less'],
tasks: ['less:compile'] tasks: ['less:compile', 'autoprefixer']
} }
}, },
...@@ -146,26 +158,25 @@ module.exports = function(grunt) { ...@@ -146,26 +158,25 @@ module.exports = function(grunt) {
sourceMap: true, sourceMap: true,
sourceMapFilename: 'ui/theme/default/css/default.all.css.map', sourceMapFilename: 'ui/theme/default/css/default.all.css.map',
sourceMapBasepath: 'ui/theme/default/css/' sourceMapBasepath: 'ui/theme/default/css/'
// compress: true,
// cleancss: true
} }
} }
}, },
autoprefixer: {
all: {
options: {
map: true
},
src: 'ui/theme/default/css/default.all.css',
dest: 'ui/theme/default/css/default.all.css'
}
}
}); });
// These plugins provide necessary tasks.
/* [Build plugin & task ] ------------------------------------*/
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
// Build task(s). // Build task(s).
grunt.registerTask('default', ['clean', 'concat', 'uglify', 'less', 'copy', 'replace']); grunt.registerTask('default', ['clean', 'concat', 'uglify', 'less', 'autoprefixer', 'copy', 'replace']);
grunt.registerTask('dev', ['less', 'watch']); grunt.registerTask('dev', ['less', 'autoprefixer', 'watch']);
}; };
\ No newline at end of file
...@@ -24,7 +24,7 @@ KityMinder.registerUI('ribbon/view/fullscreen', function(minder) { ...@@ -24,7 +24,7 @@ KityMinder.registerUI('ribbon/view/fullscreen', function(minder) {
function fullscreen() { function fullscreen() {
if ($('#content-wrapper').toggleClass('fullscreen').hasClass('fullscreen')) { if ($('#content-wrapper').toggleClass('fullscreen').hasClass('fullscreen')) {
notice.info(minder.getLang('ui.fullscreen_exit_hint')); notice.info(minder.getLang('ui.fullscreen_exit_hint'), false, 4000);
} }
} }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
*/ */
.fullscreen #about #km-cat { .fullscreen #about #km-cat {
.transform(translate(0, 0)); transform: translate(0, 0);
.transition(transform 0.7s 0.2s ease); transition: transform 0.7s 0.2s ease;
} }
#about { #about {
position: absolute; position: absolute;
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
border-bottom: 5px solid #393F4F; border-bottom: 5px solid #393F4F;
overflow: visible; overflow: visible;
.transition(all ease .3s 0.3s); transition: all ease .3s 0.3s;
.transform(translate(100%)); transform: translate(100%);
a { a {
color: #eee; color: #eee;
} }
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
position: absolute; position: absolute;
left: 15px; left: 15px;
top: 5px; top: 5px;
.transition(all ease 1.3s 0.3s); transition: all ease 1.3s 0.3s;
.transform(translate(-60px, 0)); transform: translate(-60px, 0);
cursor: pointer; cursor: pointer;
} }
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
} }
&:hover, &:hover #km-cat { &:hover, &:hover #km-cat {
.transform(translate(0)); transform: translate(0);
} }
#km-version.new-version{ #km-version.new-version{
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
border-radius: 4px; border-radius: 4px;
text-shadow: none; text-shadow: none;
box-shadow: -1px 1px 3px rgba(0,0,0,0.3); box-shadow: -1px 1px 3px rgba(0,0,0,0.3);
.transform(scale(.6)) transform: scale(.6);
} }
} }
} }
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
} }
&:before { &:before {
.transition(all .3s ease); transition: all .3s ease;
opacity: 0.6; opacity: 0.6;
content: ' '; content: ' ';
display: block; display: block;
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
} }
&:hover:before { &:hover:before {
.transform(translate3d(0, -5px, 0)); transform: translate3d(0, -5px, 0);
opacity: 1; opacity: 1;
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
font-size: 16px; font-size: 16px;
color: #CCC; color: #CCC;
margin: 150px auto; margin: 150px auto;
.transition(all .1s ease); transition: all .1s ease;
span { span {
display: block; display: block;
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
&.accept { &.accept {
border-color: lighten(@tab-active, 40%); border-color: lighten(@tab-active, 40%);
.transform(scale(1.2)); transform: scale(1.2);
} }
&.deny { &.deny {
border-color: #eee; border-color: #eee;
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
.dock; .dock;
overflow: hidden; overflow: hidden;
.transform(translate3d(0, -100%, 0)); transform: translate3d(0, -100%, 0);
transform-origin: 0 0; transform-origin: 0 0;
opacity: 0; opacity: 0;
-webkit-transition: opacity .2s ease, -webkit-transform .2s ease; -webkit-transition: opacity .2s ease, -webkit-transform .2s ease;
...@@ -51,16 +51,16 @@ ...@@ -51,16 +51,16 @@
&.show { &.show {
opacity: 1; opacity: 1;
.transform(translate3d(0, 0, 0)); transform: translate3d(0, 0, 0);
} }
.slide-in() { .slide-in() {
.transform(translateX(-(@left-width)) translateZ(0)); transform: translateX(-(@left-width)) translateZ(0);
-webkit-transition: -webkit-transform .7s ease, opacity .5s ease; -webkit-transition: -webkit-transform .7s ease, opacity .5s ease;
transition: transform .7s ease, opacity .5s ease; transition: transform .7s ease, opacity .5s ease;
.show& { .show& {
.transform(translateX(0) translateZ(0)); transform: translateX(0) translateZ(0);
-webkit-transition: -webkit-transform .7s ease, opacity .5s ease; -webkit-transition: -webkit-transform .7s ease, opacity .5s ease;
transition: transform .7s ease, opacity .5s ease; transition: transform .7s ease, opacity .5s ease;
} }
......
.fullscreen .preview-navigator { .fullscreen .preview-navigator {
.transform(translate(-20px, 10px)); transform: translate(-45px, 30px);
} }
.preview-navigator { .preview-navigator {
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
} }
} }
.fullscreen .nav-bar { .fullscreen .nav-bar {
.transform(translate(-60px, 0)); transform: translate(-60px, 0);
} }
.nav-bar { .nav-bar {
position: absolute; position: absolute;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
opacity: 0; opacity: 0;
color: white; color: white;
.transform(translate3d(0, -50px, 0)); transform: translate3d(0, -50px, 0);
p { p {
margin: 5px 0; margin: 5px 0;
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
} }
&.show { &.show {
.transform(translate3d(0, 0, 0)); transform: translate3d(0, 0, 0);
opacity: 1; opacity: 1;
} }
......
.transition(@value) {
-webkit-transition: @value;
-moz-transition: @value;
-ms-transition: @value;
-o-transition: @value;
transition: @value;
}
.transform(@value) {
-webkit-transform: @value;
-moz-transform: @value;
-ms-transform: @value;
-o-transform: @value;
tranform: @value;
}
.animation(@value) { .animation(@value) {
-webkit-animation: @value; -webkit-animation: @value;
...@@ -133,18 +118,18 @@ input[type=url] { ...@@ -133,18 +118,18 @@ input[type=url] {
@-webkit-keyframes rotate { @-webkit-keyframes rotate {
from { from {
.transform(rotate(0)); transform: rotate(0);
} }
to { to {
.transform(rotate(360deg)); transform: rotate(360deg);
} }
} }
@keyframes rotate { @keyframes rotate {
from { from {
.transform(rotate(0)); transform: rotate(0);
} }
to { to {
.transform(rotate(360deg)); transform: rotate(360deg);
} }
} }
...@@ -188,7 +173,7 @@ input[type=url] { ...@@ -188,7 +173,7 @@ input[type=url] {
padding-bottom: 4px; padding-bottom: 4px;
box-shadow: inset 0 -1px hsl(0, 0%, 92%), inset 0 -2px hsl(0, 100%, 100%), 0 1px 1px rgba(255, 255, 255, 0.3); box-shadow: inset 0 -1px hsl(0, 0%, 92%), inset 0 -2px hsl(0, 100%, 100%), 0 1px 1px rgba(255, 255, 255, 0.3);
&:after { &:after {
.transform(translate(0, 1px)); transform: translate(0, 1px);
} }
} }
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
margin-right: 3px; margin-right: 3px;
width: 30px; width: 30px;
-webkit-appearance: none; -webkit-appearance: none;
.transition(width .5s ease); transition: width .5s ease;
.transform(translateZ(0)); transform: translateZ(0);
&:focus { &:focus {
width: 150px; width: 150px;
......
.fui-button, li { .fui-button, li {
.transition(background-color .2s ease); transition: background-color .2s ease;
} }
.fui-disabled, .fui-disabled,
...@@ -78,7 +78,7 @@ input[type=search]::-ms-clear { ...@@ -78,7 +78,7 @@ input[type=search]::-ms-clear {
} }
} }
&:active { &:active {
.transform(scale(0.9)); transform: scale(0.9);
&:hover { &:hover {
background-color: @button-active; background-color: @button-active;
.fui-disabled& { .fui-disabled& {
...@@ -398,7 +398,7 @@ input[type=search]::-ms-clear { ...@@ -398,7 +398,7 @@ input[type=search]::-ms-clear {
font-size: 12px; font-size: 12px;
overflow: hidden; overflow: hidden;
.transition(none); transition: none;
&:hover, :focus { &:hover, :focus {
background: #0099f2; /* Old browsers */ background: #0099f2; /* Old browsers */
......
This diff is collapsed.
This diff is collapsed.
...@@ -106,7 +106,7 @@ KityMinder.registerUI('widget/notice', function (minder) { ...@@ -106,7 +106,7 @@ KityMinder.registerUI('widget/notice', function (minder) {
memory.set('show-error-detail', showDetail); memory.set('show-error-detail', showDetail);
}); });
function info(msg, warn) { function info(msg, warn, time) {
if (!$notice.hasClass('show')) $notice.empty(); if (!$notice.hasClass('show')) $notice.empty();
...@@ -119,12 +119,14 @@ KityMinder.registerUI('widget/notice', function (minder) { ...@@ -119,12 +119,14 @@ KityMinder.registerUI('widget/notice', function (minder) {
$notice.addClass('show'); $notice.addClass('show');
clearTimeout(info.ttl); clearTimeout(info.ttl);
time = time || (warn ? 5000 : 3000);
info.ttl = setTimeout(function() { info.ttl = setTimeout(function() {
$notice.removeClass('show'); $notice.removeClass('show');
info.ttl2 = setTimeout(function() { info.ttl2 = setTimeout(function() {
$notice.empty(); $notice.empty();
}, 1000); }, 1000);
}, warn ? 5000 : 3000); }, time);
} }
function warn(msg) { function warn(msg) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment