Commit 312fbde4 authored by techird's avatar techird

全屏支持兼容性修复

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