first commit
@@ -0,0 +1,790 @@
|
||||
/*!
|
||||
* clipboard.js v1.7.1
|
||||
* https://zenorocha.github.io/clipboard.js
|
||||
*
|
||||
* Licensed MIT © Zeno Rocha
|
||||
*/
|
||||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Clipboard = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
var DOCUMENT_NODE_TYPE = 9;
|
||||
|
||||
/**
|
||||
* A polyfill for Element.matches()
|
||||
*/
|
||||
if (typeof Element !== 'undefined' && !Element.prototype.matches) {
|
||||
var proto = Element.prototype;
|
||||
|
||||
proto.matches = proto.matchesSelector ||
|
||||
proto.mozMatchesSelector ||
|
||||
proto.msMatchesSelector ||
|
||||
proto.oMatchesSelector ||
|
||||
proto.webkitMatchesSelector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the closest parent that matches a selector.
|
||||
*
|
||||
* @param {Element} element
|
||||
* @param {String} selector
|
||||
* @return {Function}
|
||||
*/
|
||||
function closest (element, selector) {
|
||||
while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
|
||||
if (typeof element.matches === 'function' &&
|
||||
element.matches(selector)) {
|
||||
return element;
|
||||
}
|
||||
element = element.parentNode;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = closest;
|
||||
|
||||
},{}],2:[function(require,module,exports){
|
||||
var closest = require('./closest');
|
||||
|
||||
/**
|
||||
* Delegates event to a selector.
|
||||
*
|
||||
* @param {Element} element
|
||||
* @param {String} selector
|
||||
* @param {String} type
|
||||
* @param {Function} callback
|
||||
* @param {Boolean} useCapture
|
||||
* @return {Object}
|
||||
*/
|
||||
function delegate(element, selector, type, callback, useCapture) {
|
||||
var listenerFn = listener.apply(this, arguments);
|
||||
|
||||
element.addEventListener(type, listenerFn, useCapture);
|
||||
|
||||
return {
|
||||
destroy: function() {
|
||||
element.removeEventListener(type, listenerFn, useCapture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds closest match and invokes callback.
|
||||
*
|
||||
* @param {Element} element
|
||||
* @param {String} selector
|
||||
* @param {String} type
|
||||
* @param {Function} callback
|
||||
* @return {Function}
|
||||
*/
|
||||
function listener(element, selector, type, callback) {
|
||||
return function(e) {
|
||||
e.delegateTarget = closest(e.target, selector);
|
||||
|
||||
if (e.delegateTarget) {
|
||||
callback.call(element, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = delegate;
|
||||
|
||||
},{"./closest":1}],3:[function(require,module,exports){
|
||||
/**
|
||||
* Check if argument is a HTML element.
|
||||
*
|
||||
* @param {Object} value
|
||||
* @return {Boolean}
|
||||
*/
|
||||
exports.node = function(value) {
|
||||
return value !== undefined
|
||||
&& value instanceof HTMLElement
|
||||
&& value.nodeType === 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if argument is a list of HTML elements.
|
||||
*
|
||||
* @param {Object} value
|
||||
* @return {Boolean}
|
||||
*/
|
||||
exports.nodeList = function(value) {
|
||||
var type = Object.prototype.toString.call(value);
|
||||
|
||||
return value !== undefined
|
||||
&& (type === '[object NodeList]' || type === '[object HTMLCollection]')
|
||||
&& ('length' in value)
|
||||
&& (value.length === 0 || exports.node(value[0]));
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if argument is a string.
|
||||
*
|
||||
* @param {Object} value
|
||||
* @return {Boolean}
|
||||
*/
|
||||
exports.string = function(value) {
|
||||
return typeof value === 'string'
|
||||
|| value instanceof String;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if argument is a function.
|
||||
*
|
||||
* @param {Object} value
|
||||
* @return {Boolean}
|
||||
*/
|
||||
exports.fn = function(value) {
|
||||
var type = Object.prototype.toString.call(value);
|
||||
|
||||
return type === '[object Function]';
|
||||
};
|
||||
|
||||
},{}],4:[function(require,module,exports){
|
||||
var is = require('./is');
|
||||
var delegate = require('delegate');
|
||||
|
||||
/**
|
||||
* Validates all params and calls the right
|
||||
* listener function based on its target type.
|
||||
*
|
||||
* @param {String|HTMLElement|HTMLCollection|NodeList} target
|
||||
* @param {String} type
|
||||
* @param {Function} callback
|
||||
* @return {Object}
|
||||
*/
|
||||
function listen(target, type, callback) {
|
||||
if (!target && !type && !callback) {
|
||||
throw new Error('Missing required arguments');
|
||||
}
|
||||
|
||||
if (!is.string(type)) {
|
||||
throw new TypeError('Second argument must be a String');
|
||||
}
|
||||
|
||||
if (!is.fn(callback)) {
|
||||
throw new TypeError('Third argument must be a Function');
|
||||
}
|
||||
|
||||
if (is.node(target)) {
|
||||
return listenNode(target, type, callback);
|
||||
}
|
||||
else if (is.nodeList(target)) {
|
||||
return listenNodeList(target, type, callback);
|
||||
}
|
||||
else if (is.string(target)) {
|
||||
return listenSelector(target, type, callback);
|
||||
}
|
||||
else {
|
||||
throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an event listener to a HTML element
|
||||
* and returns a remove listener function.
|
||||
*
|
||||
* @param {HTMLElement} node
|
||||
* @param {String} type
|
||||
* @param {Function} callback
|
||||
* @return {Object}
|
||||
*/
|
||||
function listenNode(node, type, callback) {
|
||||
node.addEventListener(type, callback);
|
||||
|
||||
return {
|
||||
destroy: function() {
|
||||
node.removeEventListener(type, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an event listener to a list of HTML elements
|
||||
* and returns a remove listener function.
|
||||
*
|
||||
* @param {NodeList|HTMLCollection} nodeList
|
||||
* @param {String} type
|
||||
* @param {Function} callback
|
||||
* @return {Object}
|
||||
*/
|
||||
function listenNodeList(nodeList, type, callback) {
|
||||
Array.prototype.forEach.call(nodeList, function(node) {
|
||||
node.addEventListener(type, callback);
|
||||
});
|
||||
|
||||
return {
|
||||
destroy: function() {
|
||||
Array.prototype.forEach.call(nodeList, function(node) {
|
||||
node.removeEventListener(type, callback);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an event listener to a selector
|
||||
* and returns a remove listener function.
|
||||
*
|
||||
* @param {String} selector
|
||||
* @param {String} type
|
||||
* @param {Function} callback
|
||||
* @return {Object}
|
||||
*/
|
||||
function listenSelector(selector, type, callback) {
|
||||
return delegate(document.body, selector, type, callback);
|
||||
}
|
||||
|
||||
module.exports = listen;
|
||||
|
||||
},{"./is":3,"delegate":2}],5:[function(require,module,exports){
|
||||
function select(element) {
|
||||
var selectedText;
|
||||
|
||||
if (element.nodeName === 'SELECT') {
|
||||
element.focus();
|
||||
|
||||
selectedText = element.value;
|
||||
}
|
||||
else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
|
||||
var isReadOnly = element.hasAttribute('readonly');
|
||||
|
||||
if (!isReadOnly) {
|
||||
element.setAttribute('readonly', '');
|
||||
}
|
||||
|
||||
element.select();
|
||||
element.setSelectionRange(0, element.value.length);
|
||||
|
||||
if (!isReadOnly) {
|
||||
element.removeAttribute('readonly');
|
||||
}
|
||||
|
||||
selectedText = element.value;
|
||||
}
|
||||
else {
|
||||
if (element.hasAttribute('contenteditable')) {
|
||||
element.focus();
|
||||
}
|
||||
|
||||
var selection = window.getSelection();
|
||||
var range = document.createRange();
|
||||
|
||||
range.selectNodeContents(element);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
|
||||
selectedText = selection.toString();
|
||||
}
|
||||
|
||||
return selectedText;
|
||||
}
|
||||
|
||||
module.exports = select;
|
||||
|
||||
},{}],6:[function(require,module,exports){
|
||||
function E () {
|
||||
// Keep this empty so it's easier to inherit from
|
||||
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
|
||||
}
|
||||
|
||||
E.prototype = {
|
||||
on: function (name, callback, ctx) {
|
||||
var e = this.e || (this.e = {});
|
||||
|
||||
(e[name] || (e[name] = [])).push({
|
||||
fn: callback,
|
||||
ctx: ctx
|
||||
});
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
once: function (name, callback, ctx) {
|
||||
var self = this;
|
||||
function listener () {
|
||||
self.off(name, listener);
|
||||
callback.apply(ctx, arguments);
|
||||
};
|
||||
|
||||
listener._ = callback
|
||||
return this.on(name, listener, ctx);
|
||||
},
|
||||
|
||||
emit: function (name) {
|
||||
var data = [].slice.call(arguments, 1);
|
||||
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
|
||||
var i = 0;
|
||||
var len = evtArr.length;
|
||||
|
||||
for (i; i < len; i++) {
|
||||
evtArr[i].fn.apply(evtArr[i].ctx, data);
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
off: function (name, callback) {
|
||||
var e = this.e || (this.e = {});
|
||||
var evts = e[name];
|
||||
var liveEvents = [];
|
||||
|
||||
if (evts && callback) {
|
||||
for (var i = 0, len = evts.length; i < len; i++) {
|
||||
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
|
||||
liveEvents.push(evts[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove event from queue to prevent memory leak
|
||||
// Suggested by https://github.com/lazd
|
||||
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
|
||||
|
||||
(liveEvents.length)
|
||||
? e[name] = liveEvents
|
||||
: delete e[name];
|
||||
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = E;
|
||||
|
||||
},{}],7:[function(require,module,exports){
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(['module', 'select'], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(module, require('select'));
|
||||
} else {
|
||||
var mod = {
|
||||
exports: {}
|
||||
};
|
||||
factory(mod, global.select);
|
||||
global.clipboardAction = mod.exports;
|
||||
}
|
||||
})(this, function (module, _select) {
|
||||
'use strict';
|
||||
|
||||
var _select2 = _interopRequireDefault(_select);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
|
||||
var ClipboardAction = function () {
|
||||
/**
|
||||
* @param {Object} options
|
||||
*/
|
||||
function ClipboardAction(options) {
|
||||
_classCallCheck(this, ClipboardAction);
|
||||
|
||||
this.resolveOptions(options);
|
||||
this.initSelection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines base properties passed from constructor.
|
||||
* @param {Object} options
|
||||
*/
|
||||
|
||||
|
||||
_createClass(ClipboardAction, [{
|
||||
key: 'resolveOptions',
|
||||
value: function resolveOptions() {
|
||||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
this.action = options.action;
|
||||
this.container = options.container;
|
||||
this.emitter = options.emitter;
|
||||
this.target = options.target;
|
||||
this.text = options.text;
|
||||
this.trigger = options.trigger;
|
||||
|
||||
this.selectedText = '';
|
||||
}
|
||||
}, {
|
||||
key: 'initSelection',
|
||||
value: function initSelection() {
|
||||
if (this.text) {
|
||||
this.selectFake();
|
||||
} else if (this.target) {
|
||||
this.selectTarget();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'selectFake',
|
||||
value: function selectFake() {
|
||||
var _this = this;
|
||||
|
||||
var isRTL = document.documentElement.getAttribute('dir') == 'rtl';
|
||||
|
||||
this.removeFake();
|
||||
|
||||
this.fakeHandlerCallback = function () {
|
||||
return _this.removeFake();
|
||||
};
|
||||
this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true;
|
||||
|
||||
this.fakeElem = document.createElement('textarea');
|
||||
// Prevent zooming on iOS
|
||||
this.fakeElem.style.fontSize = '12pt';
|
||||
// Reset box model
|
||||
this.fakeElem.style.border = '0';
|
||||
this.fakeElem.style.padding = '0';
|
||||
this.fakeElem.style.margin = '0';
|
||||
// Move element out of screen horizontally
|
||||
this.fakeElem.style.position = 'absolute';
|
||||
this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';
|
||||
// Move element to the same position vertically
|
||||
var yPosition = window.pageYOffset || document.documentElement.scrollTop;
|
||||
this.fakeElem.style.top = yPosition + 'px';
|
||||
|
||||
this.fakeElem.setAttribute('readonly', '');
|
||||
this.fakeElem.value = this.text;
|
||||
|
||||
this.container.appendChild(this.fakeElem);
|
||||
|
||||
this.selectedText = (0, _select2.default)(this.fakeElem);
|
||||
this.copyText();
|
||||
}
|
||||
}, {
|
||||
key: 'removeFake',
|
||||
value: function removeFake() {
|
||||
if (this.fakeHandler) {
|
||||
this.container.removeEventListener('click', this.fakeHandlerCallback);
|
||||
this.fakeHandler = null;
|
||||
this.fakeHandlerCallback = null;
|
||||
}
|
||||
|
||||
if (this.fakeElem) {
|
||||
this.container.removeChild(this.fakeElem);
|
||||
this.fakeElem = null;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'selectTarget',
|
||||
value: function selectTarget() {
|
||||
this.selectedText = (0, _select2.default)(this.target);
|
||||
this.copyText();
|
||||
}
|
||||
}, {
|
||||
key: 'copyText',
|
||||
value: function copyText() {
|
||||
var succeeded = void 0;
|
||||
|
||||
try {
|
||||
succeeded = document.execCommand(this.action);
|
||||
} catch (err) {
|
||||
succeeded = false;
|
||||
}
|
||||
|
||||
this.handleResult(succeeded);
|
||||
}
|
||||
}, {
|
||||
key: 'handleResult',
|
||||
value: function handleResult(succeeded) {
|
||||
this.emitter.emit(succeeded ? 'success' : 'error', {
|
||||
action: this.action,
|
||||
text: this.selectedText,
|
||||
trigger: this.trigger,
|
||||
clearSelection: this.clearSelection.bind(this)
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'clearSelection',
|
||||
value: function clearSelection() {
|
||||
if (this.trigger) {
|
||||
this.trigger.focus();
|
||||
}
|
||||
|
||||
window.getSelection().removeAllRanges();
|
||||
}
|
||||
}, {
|
||||
key: 'destroy',
|
||||
value: function destroy() {
|
||||
this.removeFake();
|
||||
}
|
||||
}, {
|
||||
key: 'action',
|
||||
set: function set() {
|
||||
var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy';
|
||||
|
||||
this._action = action;
|
||||
|
||||
if (this._action !== 'copy' && this._action !== 'cut') {
|
||||
throw new Error('Invalid "action" value, use either "copy" or "cut"');
|
||||
}
|
||||
},
|
||||
get: function get() {
|
||||
return this._action;
|
||||
}
|
||||
}, {
|
||||
key: 'target',
|
||||
set: function set(target) {
|
||||
if (target !== undefined) {
|
||||
if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) {
|
||||
if (this.action === 'copy' && target.hasAttribute('disabled')) {
|
||||
throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
|
||||
}
|
||||
|
||||
if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
|
||||
throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
|
||||
}
|
||||
|
||||
this._target = target;
|
||||
} else {
|
||||
throw new Error('Invalid "target" value, use a valid Element');
|
||||
}
|
||||
}
|
||||
},
|
||||
get: function get() {
|
||||
return this._target;
|
||||
}
|
||||
}]);
|
||||
|
||||
return ClipboardAction;
|
||||
}();
|
||||
|
||||
module.exports = ClipboardAction;
|
||||
});
|
||||
|
||||
},{"select":5}],8:[function(require,module,exports){
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(['module', './clipboard-action', 'tiny-emitter', 'good-listener'], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener'));
|
||||
} else {
|
||||
var mod = {
|
||||
exports: {}
|
||||
};
|
||||
factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener);
|
||||
global.clipboard = mod.exports;
|
||||
}
|
||||
})(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) {
|
||||
'use strict';
|
||||
|
||||
var _clipboardAction2 = _interopRequireDefault(_clipboardAction);
|
||||
|
||||
var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter);
|
||||
|
||||
var _goodListener2 = _interopRequireDefault(_goodListener);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
|
||||
function _possibleConstructorReturn(self, call) {
|
||||
if (!self) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
|
||||
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
||||
}
|
||||
|
||||
function _inherits(subClass, superClass) {
|
||||
if (typeof superClass !== "function" && superClass !== null) {
|
||||
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
||||
}
|
||||
|
||||
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||
constructor: {
|
||||
value: subClass,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
||||
}
|
||||
|
||||
var Clipboard = function (_Emitter) {
|
||||
_inherits(Clipboard, _Emitter);
|
||||
|
||||
/**
|
||||
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
|
||||
* @param {Object} options
|
||||
*/
|
||||
function Clipboard(trigger, options) {
|
||||
_classCallCheck(this, Clipboard);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this));
|
||||
|
||||
_this.resolveOptions(options);
|
||||
_this.listenClick(trigger);
|
||||
return _this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines if attributes would be resolved using internal setter functions
|
||||
* or custom functions that were passed in the constructor.
|
||||
* @param {Object} options
|
||||
*/
|
||||
|
||||
|
||||
_createClass(Clipboard, [{
|
||||
key: 'resolveOptions',
|
||||
value: function resolveOptions() {
|
||||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
|
||||
this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
|
||||
this.text = typeof options.text === 'function' ? options.text : this.defaultText;
|
||||
this.container = _typeof(options.container) === 'object' ? options.container : document.body;
|
||||
}
|
||||
}, {
|
||||
key: 'listenClick',
|
||||
value: function listenClick(trigger) {
|
||||
var _this2 = this;
|
||||
|
||||
this.listener = (0, _goodListener2.default)(trigger, 'click', function (e) {
|
||||
return _this2.onClick(e);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'onClick',
|
||||
value: function onClick(e) {
|
||||
var trigger = e.delegateTarget || e.currentTarget;
|
||||
|
||||
if (this.clipboardAction) {
|
||||
this.clipboardAction = null;
|
||||
}
|
||||
|
||||
this.clipboardAction = new _clipboardAction2.default({
|
||||
action: this.action(trigger),
|
||||
target: this.target(trigger),
|
||||
text: this.text(trigger),
|
||||
container: this.container,
|
||||
trigger: trigger,
|
||||
emitter: this
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'defaultAction',
|
||||
value: function defaultAction(trigger) {
|
||||
return getAttributeValue('action', trigger);
|
||||
}
|
||||
}, {
|
||||
key: 'defaultTarget',
|
||||
value: function defaultTarget(trigger) {
|
||||
var selector = getAttributeValue('target', trigger);
|
||||
|
||||
if (selector) {
|
||||
return document.querySelector(selector);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'defaultText',
|
||||
value: function defaultText(trigger) {
|
||||
return getAttributeValue('text', trigger);
|
||||
}
|
||||
}, {
|
||||
key: 'destroy',
|
||||
value: function destroy() {
|
||||
this.listener.destroy();
|
||||
|
||||
if (this.clipboardAction) {
|
||||
this.clipboardAction.destroy();
|
||||
this.clipboardAction = null;
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: 'isSupported',
|
||||
value: function isSupported() {
|
||||
var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];
|
||||
|
||||
var actions = typeof action === 'string' ? [action] : action;
|
||||
var support = !!document.queryCommandSupported;
|
||||
|
||||
actions.forEach(function (action) {
|
||||
support = support && !!document.queryCommandSupported(action);
|
||||
});
|
||||
|
||||
return support;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Clipboard;
|
||||
}(_tinyEmitter2.default);
|
||||
|
||||
/**
|
||||
* Helper function to retrieve attribute value.
|
||||
* @param {String} suffix
|
||||
* @param {Element} element
|
||||
*/
|
||||
function getAttributeValue(suffix, element) {
|
||||
var attribute = 'data-clipboard-' + suffix;
|
||||
|
||||
if (!element.hasAttribute(attribute)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return element.getAttribute(attribute);
|
||||
}
|
||||
|
||||
module.exports = Clipboard;
|
||||
});
|
||||
|
||||
},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)
|
||||
});
|
||||
|
After Width: | Height: | Size: 161 KiB |
@@ -0,0 +1,40 @@
|
||||
/** 编辑器颜色定义 */
|
||||
.f-color-html-tag{color:#3f7f7f;}
|
||||
.f-color-html-name{color:#7f0055;}
|
||||
.f-color-html-value{color:#2a00ff;}
|
||||
.f-color-html-comment{color:#808080;}
|
||||
.f-color-ftml-echo{color:#cc3352;}
|
||||
.f-color-ftml-call{color:#cc3352;}
|
||||
.f-color-ftml-directive{color:#00f;}
|
||||
.f-color-ftml-directive-related{color:#ffff80;}
|
||||
.f-color-ftml-string{color:#008080;}
|
||||
.f-color-ftml-comment{color:#a00;}
|
||||
.f-color-css-name{color:#000;}
|
||||
.f-color-css-property{color:#7f0055;}
|
||||
.f-color-css-value{color:#000;}
|
||||
.f-color-css-string{color:#2a00ff;}
|
||||
.f-color-css-comment{color:#3f7f5f;}
|
||||
.f-color-js-key{color:#7f0055;}
|
||||
.f-color-js-string{color:#2a00ff;}
|
||||
.f-color-js-comment{color:#3f7f5f;}
|
||||
.f-color-js-comment-multi{color:#7f9fbf;}
|
||||
|
||||
.fi-color-html-tag{color:#3f7f7f !important;}
|
||||
.fi-color-html-name{color:#7f0055 !important;}
|
||||
.fi-color-html-value{color:#2a00ff !important;}
|
||||
.fi-color-html-comment{color:#808080 !important;}
|
||||
.fi-color-ftml-echo{color:#cc3352 !important;}
|
||||
.fi-color-ftml-call{color:#cc3352 !important;}
|
||||
.fi-color-ftml-directive{color:#00f !important;}
|
||||
.fi-color-ftml-directive-related{color:#ffff80 !important;}
|
||||
.fi-color-ftml-string{color:#008080 !important;}
|
||||
.fi-color-ftml-comment{color:#a00 !important;}
|
||||
.fi-color-css-name{color:#000 !important;}
|
||||
.fi-color-css-property{color:#7f0055 !important;}
|
||||
.fi-color-css-value{color:#000 !important;}
|
||||
.fi-color-css-string{color:#2a00ff !important;}
|
||||
.fi-color-css-comment{color:#3f7f5f !important;}
|
||||
.fi-color-js-key{color:#7f0055 !important;}
|
||||
.fi-color-js-string{color:#2a00ff !important;}
|
||||
.fi-color-js-comment{color:#3f7f5f !important;}
|
||||
.fi-color-js-comment-multi{color:#7f9fbf !important;}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。
|
||||
*
|
||||
* Download http://fadfox.zhiqim.com/ 欢迎加盟[凡狐]兴趣小组。
|
||||
*
|
||||
* 本文采用《知启蒙登记发行许可证》,除非符合许可证,否则不可使用该文件!
|
||||
* 1、您可以免费使用、修改、合并、出版发行和分发,再授权软件、软件副本及衍生软件;
|
||||
* 2、您用于商业用途时,必须在原作者指定的登记网站,按原作者要求进行登记;
|
||||
* 3、您在使用、修改、合并、出版发行和分发时,必须包含版权声明、许可声明,及保留原作者的著作权、商标和专利等知识产权;
|
||||
* 4、您在互联网、移动互联网等大众网络下发行和分发再授权软件、软件副本及衍生软件时,必须在原作者指定的发行网站进行发行和分发;
|
||||
* 5、您可以在以下链接获取一个完整的许可证副本。
|
||||
*
|
||||
* 许可证链接:http://zhiqim.org/licenses/zhiqim_register_publish_license.htm
|
||||
*
|
||||
* 除非法律需要或书面同意,软件由原始码方式提供,无任何明示或暗示的保证和条件。详见完整许可证的权限和限制。
|
||||
*/
|
||||
+(function(F)
|
||||
{
|
||||
//BEGIN
|
||||
|
||||
if (F.B.msieVer > 8 || screen.width > 1071)
|
||||
return;
|
||||
|
||||
F.onload(function()
|
||||
{
|
||||
F(".mainnav .menu").css("marginLeft", "18px");
|
||||
F(".mainnav .menu li").css("margin", "12px 2px;");
|
||||
|
||||
F(".footer li.fproduct").css("width", "140px");
|
||||
F(".footer li.fhelp").css("width", "180px");
|
||||
F(".footer li.fabout").css("width", "140px");
|
||||
F(".footer li.abountus").css("width", "280px");
|
||||
|
||||
F(".footer-cp-wrap").css("width", "1000px");
|
||||
F(".footer-cp .footer-text").css("width", "1000px").css("marginLeft", "-100px");
|
||||
});
|
||||
|
||||
//END
|
||||
})(fadfox);
|
||||
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 816 B |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 968 B |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,273 @@
|
||||
/**************************************************************************************/
|
||||
/* 布局(全局、导航、脚注) */
|
||||
/**************************************************************************************/
|
||||
|
||||
/* [全局定义] */
|
||||
html{overflow-x:hidden;}
|
||||
body,table,td,div{font-size:14px;line-height:120%;}
|
||||
a,a:visited{color:#333;text-decoration:none;cursor:pointer;}
|
||||
a:active,a:hover{color:#008bd2;text-decoration:none;}
|
||||
a.blue,a.blue:visited{color:#0066cc;text-decoration:none;cursor:pointer;}
|
||||
a.blue:active,a.blue:hover{color:#0066cc;text-decoration:underline;}
|
||||
|
||||
/* [顶导航] */
|
||||
.topnav {position:fixed;top:0;left:0;width:100%;min-width:1250px;color: #fff;background-color:#00a2eb;height:55px;z-index:99;}
|
||||
.topnav .logo {float:left;width:60px;height:55px;line-height:55px;background-color:#008bd2;}
|
||||
.topnav .logoname {float:left;font-size:28px;width:240px;height:55px;line-height:52px;background-color:#00a2eb;color:#fff;padding-left:10px;border-right:1px solid #008bd2;}
|
||||
|
||||
.topnav .topnavleft {float:left;height:55px;line-height:55px;}
|
||||
.topnav .topnavleft .nav {float:left;width:96px;height:55px;line-height:55px;font-size:16px;margin-right:5px;text-align:center;letter-spacing:2px;cursor:pointer;}
|
||||
.topnav .topnavleft .nav:hover{color:#fff;background-color:#008bd2;border-left:1px solid #0583cc;border-right:1px solid #0583cc;}
|
||||
.topnav .topnavleft .nav.active{color:#fff;background-color:#008bd2;border-left:1px solid #0583cc;border-right:1px solid #0583cc;}
|
||||
|
||||
.topnav .topnavright {float:right;height:55px;}
|
||||
.topnav .topnavright .nav {float:left;height:55px;line-height:55px;font-size:14px;border-left:1px solid #008bd2;}
|
||||
.topnav .topnavright .nav:hover {background-color:#01a7f2; color:#fff;}
|
||||
.topnav .topnavright .query{float:left;width:300px;margin-right:15px;height:55px;line-height:50px;text-align:center;}
|
||||
.topnav .topnavright .query input{width:85%;color:#ffffff;border-bottom:1px solid #f5f5f5;border-top:0px;border-left:0px;border-right:0px; -webkit-box-shadow:none;-moz-box-shadow:none; box-shadow:none;background-color:transparent;}
|
||||
@media screen and (max-width:1430px){.topnav .topnavleft .nav {width:93px;}.topnav .topnavright .query{width:250px;}}
|
||||
@media screen and (max-width:1360px){.topnav .topnavleft .nav {width:88px;}.topnav .topnavright .query{width:200px;}}
|
||||
|
||||
.topnav .topnavright .navcray {float:left;height:55px;line-height:55px;font-size:14px;border-left:1px solid #008bd2;background-color:#08c2c0;}
|
||||
.topnav .topnavright .navcray:hover {background-color:#1fcdcb; color:#fff;}
|
||||
|
||||
/* [顶导航固定55px] */
|
||||
.topnav-margin{position:relative;width:100%;height:55px;}
|
||||
|
||||
/* [顶导航通知] */
|
||||
.noticenum{position:absolute;top:0;right:8px;padding:0 2px;border-radius:50px;box-shadow:0 0 0 2px #ffffff;min-width:20px;line-height:20px;font-style:normal;background-color:#ff0000;color:#fff;font-size:12px;}
|
||||
|
||||
/**************************************************************************************/
|
||||
/* 首页分屏 */
|
||||
/**************************************************************************************/
|
||||
|
||||
.sectiontitle{font-size:30px;margin-bottom:10px;font-weight:bold;}
|
||||
|
||||
/* 区域 */
|
||||
.section{position:relative;width:100%;height:600px;background-color:#f8f8f8;}
|
||||
.section .first,
|
||||
.section .second,
|
||||
.section .third,
|
||||
.section .fourth,
|
||||
.section .fifth,
|
||||
.section .sixth{position:absolute;margin:auto;top:0;left:0;bottom:0;right:0;width:100%;max-width:1250px;}
|
||||
|
||||
/* 首屏 */
|
||||
.section .first{height:550px;width:100%}
|
||||
.section .first .title{position:relative;margin:20px auto 0 auto;width:706px;height:84px;text-align:center;}
|
||||
.section .first .intro{padding:0 50px; display: -webkit-flex; /* Safari */ display: flex; flex-direction:row;flex-wrap:nowrap;justify-content:space-between;align-items:center;margin:80px auto 0 auto;color:#fff;}
|
||||
.section .first .intro button{border:1px solid #fff;background-color:transparent;border-radius:4px;color:#fff;font-size:16px;}
|
||||
.section .first .count{margin-top:50px;padding-right:40px;text-align:right;font-size:24px;color:#fff;}
|
||||
|
||||
/* 第二屏 */
|
||||
.section .second{height:550px;}
|
||||
.section .second .brief{margin-top:90px;padding-left:20px;}
|
||||
.section .second .brief a{color:#1e7eec;}
|
||||
|
||||
/* 第三屏 */
|
||||
.section .third{height:460px;}
|
||||
.section .third .producttitle{font-size:40px;margin-bottom:10px;font-weight:bold;}
|
||||
.section .third .productfont{font-size:18px;color:#555;}
|
||||
.section .third .productfont ul{margin-top:15px;}
|
||||
.section .third .productfont li{color:#555;line-height:38px;list-style:none;list-style-image: url(images/disc.png);list-style-position: inside;}
|
||||
|
||||
.fadeInDown .z-float-left{
|
||||
display : block !important;
|
||||
animation:fadeInDown 1s;
|
||||
/* Firefox: */
|
||||
-moz-animation:fadeInDown 1s;
|
||||
/* Safari and Chrome: */
|
||||
-webkit-animation:fadeInDown 1s;
|
||||
/* Opera: */
|
||||
-o-animation:fadeInDown 1s;}
|
||||
@keyframes fadeInDown
|
||||
{
|
||||
0% {opacity: 0;-webkit-transform: translate3d(0,-600px,0);transform: translate3d(0,-600px,0);}
|
||||
100% {opacity: 1;-webkit-transform: none;transform: none;}
|
||||
}
|
||||
|
||||
@-moz-keyframes fadeInDown /* Firefox */
|
||||
{
|
||||
0% {opacity: 0;-webkit-transform: translate3d(0,-600px,0);transform: translate3d(0,-600px,0);}
|
||||
100% {opacity: 1;-webkit-transform: none;transform: none;}
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeInDown /* Safari and Chrome */
|
||||
{
|
||||
0% {opacity: 0;-webkit-transform: translate3d(0,-600px,0);transform: translate3d(0,-600px,0);}
|
||||
100% {opacity: 1;-webkit-transform: none;transform: none;}
|
||||
}
|
||||
|
||||
@-o-keyframes fadeInDown /* Opera */
|
||||
{
|
||||
0% {opacity: 0;-webkit-transform: translate3d(0,-600px,0);transform: translate3d(0,-600px,0);}
|
||||
100% {opacity: 1;-webkit-transform: none;transform: none;}
|
||||
}
|
||||
|
||||
/* 第四屏 */
|
||||
.section .fourth{height:460px;}
|
||||
.section .fourth .brief{margin-top:90px;padding-left:20px;}
|
||||
.section .fourth .brief a{color:#1e7eec;}
|
||||
.section .fourth .brief .corporate{font-size:30px;margin-bottom:10px;font-weight:bold;}
|
||||
|
||||
/* 第五屏 */
|
||||
.section .fifth{height:460px;}
|
||||
.section .fifth .brief{margin-top:110px;}
|
||||
.section .fifth .brief a{color:#1e7eec;}
|
||||
|
||||
/* 第六屏 */
|
||||
.section .sixth{height:460px;}
|
||||
.section .sixth .brief{margin-top:90px;}
|
||||
.section .sixth .brief a{color:#1e7eec;}
|
||||
|
||||
/**************************************************************************************/
|
||||
/* 容器内容 */
|
||||
/**************************************************************************************/
|
||||
|
||||
/** [容器定义] */
|
||||
.container {display: flex;width:100%;min-width:1250px;height:100%;min-height:1000px;overflow:hidden;background-color:#fff;}
|
||||
|
||||
/* [左导航] */
|
||||
.sidebar-top{position:relative;float:left;width:60px;height:100%;overflow:hidden; background-color:#333;z-index:20;padding-bottom: 9999px;margin-bottom: -9999px;}
|
||||
.sidebar-top li{position:relative;float:left;width:60px;height:70px;display:inline-block;text-align:center;color:#fff;padding:13px 0;line-height:22px;}
|
||||
.sidebar-top li:hover{background-color:#414750;cursor:pointer;}
|
||||
.sidebar-top li.active{background-color:#5c5c5c;}
|
||||
.sidebar-top li i{font-size:22px;}
|
||||
.sidebar-top .avatar{text-align:center;padding:16px 5px;cursor:pointer;}
|
||||
|
||||
.sidebar-child{position:relative;margin-left:60px;width:240px;height:100%;overflow:hidden; background-color:#f2f2f2;border-right:1px solid #d8dce5;z-index:20;padding-bottom: 9999px;margin-bottom: -9999px;}
|
||||
.sidebar-child p{position:relative;float:left;width:240px; height:40px;line-height:40px;color:#333; padding-left:25px; background-color:#f2f2f2;cursor:pointer;}
|
||||
.sidebar-child p a{color:#333;}
|
||||
.sidebar-child p .f-arrow>span{border-color:#eff6fc transparent transparent;}
|
||||
.sidebar-child p:hover{background-color:#f2f1ed;color:#008bd2;}
|
||||
.sidebar-child p.active{background-color:#e4e3df;color:#008bd2;}
|
||||
.sidebar-child p:hover>.f-arrow>span{border-color:#333 transparent transparent;}
|
||||
.sidebar-child p.active>.f-arrow>span{border-color:#333 transparent transparent;}
|
||||
|
||||
.sidebar-child ul{position:relative;width:240px;height:auto;overflow:hidden;}
|
||||
.sidebar-child ul li{float:left;width:240px;height:40px;color:#666;line-height:40px;padding-left:40px;cursor:pointer;}
|
||||
.sidebar-child ul li a{color:#666;}
|
||||
.sidebar-child ul li:hover{background-color:#f2f1ed; color:#008bd2;}
|
||||
.sidebar-child ul li.active{background-color:#e4e3df; color:#008bd2;}
|
||||
|
||||
.sidebar-child .info{position:relative;width:100%;padding:25px;}
|
||||
|
||||
.sidebar-child .coursenav{position:relative;width:100%;padding:20px;}
|
||||
.sidebar-child .coursenav a{width:95px;line-height:30px;display:inline-block;}
|
||||
.sidebar-child .coursenav a.active{color:#008bd2;display:inline-block;}
|
||||
|
||||
.ueseroperate{position:relative;width:100%;overflow:hidden;padding-top:15px;min-height:200px; padding-left:25px;border-top:1px solid #e5e5e5;}
|
||||
.ueseroperate .operatemenu{position:relative;cursor: pointer;color: #999;height:40px;line-height:40px;}
|
||||
.ueseroperate .operatemenu:hover{color:#333;}
|
||||
|
||||
/* 边导航用户信息 */
|
||||
.sidebar-child .userinfo{position:relative;width:100%;padding:5px 20px 5px 20px;}
|
||||
.sidebar-child .recommend{position:relative;width:100%;padding:20px 20px 20px 20px;margin-top:20px;}
|
||||
|
||||
/* [主体部分] */
|
||||
.mainbody{position:relative;width:100%;}
|
||||
.mainbody .content{position:relative;float:left;width:100%;padding:25px;}
|
||||
.mainbody.componentBody{margin-left:60px;}
|
||||
|
||||
/* 当前位置 */
|
||||
.breadcrumb{position:relative;float:left;width:100%;padding-left:25px;}
|
||||
|
||||
.scrolltotop{position:fixed;right:20px;bottom:20px;display:none;z-index:99999;border:1px solid #d3d3d3;padding:10px;cursor:pointer;}
|
||||
.scrolltotop:hover{background-color:#333;}
|
||||
|
||||
/* 产品 */
|
||||
.productwarp{position:relative;width:100%;padding-bottom:20px;border-bottom:1px dashed #ccc;margin-bottom:30px;overflow: hidden;}
|
||||
.productwarp .twoellipsis{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-all;}
|
||||
|
||||
.productlist{position:relative;width:100%;padding:20px;margin-bottom:20px;border:1px solid #d8dce5;background-color:#fff;overflow: hidden;box-shadow:0px 0px 2px 2px #ebebeb;}
|
||||
.productlist:hover{box-shadow:0px 0px 3px 3px #ebebeb;}
|
||||
.projectlist-right{width:100%;padding-left:240px;margin-left:-200px;text-align:left;}
|
||||
|
||||
/* 产品优势 */
|
||||
.advantagelist{float:left;width:50%;padding:15px 10px;margin-bottom:20px;height:150px;}
|
||||
.advantagelist:nth-child(odd){padding-right:50px;}
|
||||
.advantagelist:nth-child(even){padding-left:50px;}
|
||||
.advantagelist .advantagelist-right{width:100%;padding-left:140px;margin-left:-140px;margin-top:25px;}
|
||||
|
||||
.advantage{font-size:18px;color:#555;margin-top:40px;}
|
||||
.advantage li{color:#555;line-height:45px;list-style:none;list-style-image: url(images/disc.png);list-style-position: inside;}
|
||||
|
||||
.dktitle{font-size:30px;margin-bottom:20px;}
|
||||
.dkadvantage{font-size:18px;color:#555;margin-top:40px;}
|
||||
.dkadvantage ul{margin-top:15px;}
|
||||
.dkadvantage li{color:#555;line-height:38px;list-style:none;list-style-image: url(images/disc.png);list-style-position: inside;}
|
||||
|
||||
.twoellipsis{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-all;}
|
||||
|
||||
/* [脚注] */
|
||||
.footer {position:relative;width:100%;min-width:1250px;z-index:0;display:block;border-top:1px solid #e6e6e6;overflow:hidden;}
|
||||
.footer-wrap {margin:10px auto;height:160px;width:1250px;text-align:center;color:#333;font-size:14px;}
|
||||
.footer li {float:left;height:130px;margin:10px 20px 10px 0;text-align:left;line-height:30px;color:#888;}
|
||||
.footer li a {margin:10px;color:#888;}
|
||||
.footer li a:hover {color:#1e7eec;}
|
||||
.footer li.fproduct{width:180px;margin-left:30px;}
|
||||
.footer li.fhelp{width:222px;}
|
||||
.footer li.fabout{width:190px;}
|
||||
.footer li.abountus {width:300px;}
|
||||
.footer li.fproduct,.footer li.fhelp,.footer li.fabout{border-right:1px dashed #ccc;}
|
||||
|
||||
@media screen and (max-width: 1071px) {
|
||||
.footer li.fproduct{width:140px;}
|
||||
.footer li.fhelp{width:180px;}
|
||||
.footer li.fabout{width:150px;}
|
||||
.footer li.abountus {width:280px;}
|
||||
}
|
||||
|
||||
.footer-cp {position:relative;width:100%;min-width:1250px;height:85px;line-height:85px;background-color:#eee;overflow:hidden;}
|
||||
.footer-cp-wrap{position:relative;margin:0 auto;width:1250px;height:85px;z-index:0;display:block;overflow:hidden;}
|
||||
.footer-cp .footer-text{width:1250px;height:85px;line-height:85px;text-align:center;}
|
||||
@media screen and (max-width: 1071px) {
|
||||
.footer-cp-wrap{width:1000px;}
|
||||
.footer-cp .footer-text{width:1000px;margin-left:-100px;}
|
||||
}
|
||||
|
||||
/* 指南标题 */
|
||||
.tutorial.title {position:relative;float:left;font-size:20px;font-weight:bold;color:#555;width:100%;height:45px;margin-top:30px;margin-bottom:30px;line-height:45px;border-bottom:1px solid #e7e7e7;}
|
||||
.tutorial.title .right{float:right;}
|
||||
|
||||
/* 指南内部标题 */
|
||||
.tutorial.ctitle {position:relative;float:left;font-size:18px !important; color:#444;width:100%;height:25px;line-height:40px;}
|
||||
.tutorial.ctitle .right{float:right;}
|
||||
/* 指南内部内容 */
|
||||
.tutorial.csamp{display:table-cell; background-color:#f8f8f8; font-size:13px !important; padding:6px !important; line-height:1.42857143 !important;}
|
||||
.tutorial.ccontent{position:relative;font-size:18px !important; color:#555;width:100%;line-height:25px; margin-top:40px;}
|
||||
|
||||
/* 功能列表 */
|
||||
.tutorial header {font-size:28px;font-weight:700;line-height:200%;}
|
||||
.tutorial li {list-style-type:disc;line-height:180%;margin-left:25px;margin-bottom:10px;}
|
||||
.tutorial.decimal li {list-style-type:decimal;}
|
||||
|
||||
/* 功能链接 */
|
||||
.tutorial.feature {font-size:16px;}
|
||||
.tutorial.feature a{color:#08c;text-decoration:none;}
|
||||
.tutorial.feature a:hover{text-decoration:underline;}
|
||||
|
||||
/* 右边浮动图标 */
|
||||
.fixedright{position:fixed;top:120px;right:25px;width:60px;background-color:#fff;border:1px solid #d5d5d5;border-bottom:0;}
|
||||
.fixedright li{background-color:#fff;text-align:center;padding:10px 0;border-bottom:1px solid #d5d5d5;cursor:pointer;color:#999;}
|
||||
.fixedright li:hover{background-color:#f8f8f8;color:#00a2eb;}
|
||||
|
||||
/** 定义右边浮动图标 */
|
||||
.fixedicon{display:inline-block;width:24px;height:24px;vertical-align: middle;background-image:url(/zinc/www/images/fixicon.png);background-repeat: no-repeat;}
|
||||
.collection{background-position:0 0;} /* 收藏 */
|
||||
.consultant{background-position:0 -24px;} /* 客服咨询 */
|
||||
.wechat{background-position:0 -48px;} /* 微信 */
|
||||
.microblog{background-position:0 -72px;} /* 微博 */
|
||||
.qq{background-position:0 -96px;} /* qq */
|
||||
.praise{background-position:0 -120px;} /* 点赞 */
|
||||
.copy{background-position:0 -144px;} /* 复制 */
|
||||
.follow{background-position:0 -168px;} /* 关注 */
|
||||
|
||||
li:hover .collection{background-position:-24px 0;} /* 收藏 */
|
||||
li:hover .consultant{background-position:-24px -24px;} /* 客服咨询 */
|
||||
li:hover .wechat{background-position:-24px -48px;} /* 微信 */
|
||||
li:hover .microblog{background-position:-24px -72px;} /* 微博 */
|
||||
li:hover .qq{background-position:-24px -96px;} /* qq */
|
||||
li:hover .praise{background-position:-24px -120px;} /* 点赞 */
|
||||
li:hover .copy{background-position:-24px -144px;} /* 复制 */
|
||||
li:hover .follow{background-position:-24px -168px;} /* 关注 */
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 版权所有 (C) 2015 知启蒙(WWW.ZHIQIM.COM) 保留所有权利。
|
||||
*
|
||||
* Download http://zhiqim.zhiqim.com/ 欢迎加盟[知启蒙]兴趣小组。
|
||||
*
|
||||
* 本文采用《知启蒙许可证》,除非符合许可证,否则不可使该文件!
|
||||
* 1、您可以免费使用、修改、合并、出版发行和分发,再授权软件、软件副本及衍生软件;
|
||||
* 2、您用于商业用途时,必须在原作者指定的发行站点进行登记;
|
||||
* 3、您在使用、修改、合并、出版发行和分发时,必须包含版权声明、许可声明,及保留原作者的著作权、商标等知识产权;
|
||||
* 4、您在互联网等大众网络下发行和分发再授权软件、软件副本及衍生软件时,必须在原作者指定的发行站点进行发行和分发;
|
||||
* 5、您可以在以下链接获取一个完整的许可证副本。
|
||||
*
|
||||
* 许可证链接:http://www.zhiqim.com/licenses/LICENSE
|
||||
* 发行站点:http://www.zhiqim.com
|
||||
*
|
||||
* 除非法律需要或书面同意,软件由原始码方式提供,无任何明示或暗示的保证和条件。详见完整许可证的权限和限制。
|
||||
*/
|
||||
Z.Fullscreen =
|
||||
{//moz是FullScreen,其他都是Fullscreen
|
||||
target: null,
|
||||
elem: function()
|
||||
{//全屏对象
|
||||
return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement
|
||||
|| document.msFullscreenElement || document.oFullscreenElement || Z.Fullscreen.target;
|
||||
},
|
||||
enabled: function()
|
||||
{//是否开启全屏
|
||||
return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled
|
||||
|| document.msFullscreenEnabled || document.oFullscreenEnabled;
|
||||
},
|
||||
change: function(func)
|
||||
{//更改方法
|
||||
var name = null;
|
||||
if (document.body.requestFullscreen)
|
||||
name = "fullscreenchange";
|
||||
else if(document.body.webkitRequestFullscreen)
|
||||
name = "webkitfullscreenchange";
|
||||
else if(document.body.mozRequestFullScreen)
|
||||
name = "mozfullscreenchange";
|
||||
else if(document.body.msRequestFullscreen)
|
||||
name = "msfullscreenchange";
|
||||
else if(document.body.oRequestFullscreen)
|
||||
name = "ofullscreenchange";
|
||||
|
||||
if (name != null)
|
||||
{//支持则增加监听
|
||||
Z.Event.add(document, name, func);
|
||||
}
|
||||
},
|
||||
full: function(id)
|
||||
{
|
||||
var elem = Z.Document.id(id);
|
||||
if (elem.requestFullscreen)
|
||||
elem.requestFullscreen();
|
||||
else if(elem.webkitRequestFullscreen)
|
||||
elem.webkitRequestFullScreen();
|
||||
else if(elem.mozRequestFullScreen)
|
||||
elem.mozRequestFullScreen();
|
||||
else if(elem.msRequestFullscreen)
|
||||
elem.msRequestFullscreen();
|
||||
else if(elem.oRequestFullscreen)
|
||||
elem.oRequestFullscreen();
|
||||
|
||||
Z.Fullscreen.target = elem;
|
||||
},
|
||||
toggle: function()
|
||||
{
|
||||
Z.Fullscreen.change(Z.Fullscreen.toggleHandler);
|
||||
},
|
||||
toggleHandler: function()
|
||||
{
|
||||
var elem = Z.Fullscreen.elem();
|
||||
if (elem.paused)
|
||||
elem.play();
|
||||
else
|
||||
elem.pause();
|
||||
}
|
||||
};
|
||||
|
||||
Z.onload(function()
|
||||
{//全屏播放,退出暂停
|
||||
Z.Fullscreen.toggle();
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。
|
||||
*
|
||||
* 指定登记&发行网站: https://www.zhiqim.com/ 欢迎加盟知启蒙,[编程有你,知启蒙一路随行]。
|
||||
*
|
||||
* 本文采用《知启蒙登记发行许可证》,除非符合许可证,否则不可使用该文件!
|
||||
* 1、您可以免费使用、修改、合并、出版发行和分发,再授权软件、软件副本及衍生软件;
|
||||
* 2、您用于商业用途时,必须在原作者指定的登记网站,按原作者要求进行登记;
|
||||
* 3、您在使用、修改、合并、出版发行和分发时,必须包含版权声明、许可声明,及保留原作者的著作权、商标和专利等知识产权;
|
||||
* 4、您在互联网、移动互联网等大众网络下发行和分发再授权软件、软件副本及衍生软件时,必须在原作者指定的发行网站进行发行和分发;
|
||||
* 5、您可以在以下链接获取一个完整的许可证副本。
|
||||
*
|
||||
* 许可证链接:http://zhiqim.org/licenses/zhiqim_register_publish_license.htm
|
||||
*
|
||||
* 除非法律需要或书面同意,软件由原始码方式提供,无任何明示或暗示的保证和条件。详见完整许可证的权限和限制。
|
||||
*/
|
||||
|
||||
+(function(Z)
|
||||
{//BEGIN
|
||||
|
||||
Z.onload(function()
|
||||
{
|
||||
var $top = Z("<div></div>")
|
||||
.addClass("z-fixed z-pointer z-bd z-pd-t20 z-text-center z-bg-white")
|
||||
.css({"top":513,"right":25,"width":60, "height":65,"z-index":99999})
|
||||
.click(function(){window.scrollTo(0,0);})
|
||||
.hover(function(){$top.css("background-color", "#f8f8f8")}, function(){$top.css("background-color", "transparent")})
|
||||
.html("<img src='/zinc/www/images/scrolltotop.png'>")
|
||||
.appendTo("body")
|
||||
.hide();
|
||||
|
||||
Z(document).scroll(function()
|
||||
{
|
||||
if (Z.D.scrollTop() > 0)
|
||||
$top.show();
|
||||
else
|
||||
$top.hide();
|
||||
});
|
||||
});
|
||||
|
||||
//END
|
||||
})(zhiqim);
|
||||