Commit 6d07ab6f authored by Alexey.Golubev's avatar Alexey.Golubev Committed by Alexander.Trofimov

Рефакторинг офиса.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@46983 954022d7-b5bf-4e40-9824-e11837661b57
parent 7d62b4c8
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Unit Tests</title>
<script type="text/javascript" src="jquery/jquery-1.7.2.js"></script>
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen" />
<script type="text/javascript" src="qunit/qunit.js"></script>
<script type="text/javascript" src="../FontsFreeType/font_engine.js"></script>
<script type="text/javascript" src="../FontsFreeType/FontFile.js"></script>
<script type="text/javascript" src="../FontsFreeType/FontManager.js"></script>
<script type="text/javascript" src="../FontsFreeType/FontLoader.js"></script>
<script type="text/javascript" src="../FontsFreeType/AllFonts.js"></script>
<script type="text/javascript" src="../FontsFreeType/FontExport.js"></script>
<script type="text/javascript" src="tests.js"></script>
</head>
<body>
<h1 id="qunit-header">Cell Format Lib Tests</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">test markup, will be hidden</div>
</body>
</html>
This diff is collapsed.
QUnit.extend( QUnit, {
pixelEqual: function(canvas, x, y, r, g, b, a, message) {
var actual = Array.prototype.slice.apply(canvas.getContext('2d').getImageData(x, y, 1, 1).data), expected = [r, g, b, a];
QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
}
});
/**
* QUnit v1.7.0pre - A JavaScript Unit Testing Framework
*
* http://docs.jquery.com/QUnit
*
* Copyright (c) 2012 John Resig, Jörn Zaefferer
* Dual licensed under the MIT (MIT-LICENSE.txt)
* or GPL (GPL-LICENSE.txt) licenses.
*/
/** Font Family and Sizes */
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
}
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
#qunit-tests { font-size: smaller; }
/** Resets */
#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
margin: 0;
padding: 0;
}
/** Header */
#qunit-header {
padding: 0.5em 0 0.5em 1em;
color: #8699a4;
background-color: #0d3349;
font-size: 1.5em;
line-height: 1em;
font-weight: normal;
border-radius: 15px 15px 0 0;
-moz-border-radius: 15px 15px 0 0;
-webkit-border-top-right-radius: 15px;
-webkit-border-top-left-radius: 15px;
}
#qunit-header a {
text-decoration: none;
color: #c2ccd1;
}
#qunit-header a:hover,
#qunit-header a:focus {
color: #fff;
}
#qunit-header label {
display: inline-block;
padding-left: 0.5em;
}
#qunit-banner {
height: 5px;
}
#qunit-testrunner-toolbar {
padding: 0.5em 0 0.5em 2em;
color: #5E740B;
background-color: #eee;
}
#qunit-userAgent {
padding: 0.5em 0 0.5em 2.5em;
background-color: #2b81af;
color: #fff;
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
}
/** Tests: Pass/Fail */
#qunit-tests {
list-style-position: inside;
}
#qunit-tests li {
padding: 0.4em 0.5em 0.4em 2.5em;
border-bottom: 1px solid #fff;
list-style-position: inside;
}
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
display: none;
}
#qunit-tests li strong {
cursor: pointer;
}
#qunit-tests li a {
padding: 0.5em;
color: #c2ccd1;
text-decoration: none;
}
#qunit-tests li a:hover,
#qunit-tests li a:focus {
color: #000;
}
#qunit-tests ol {
margin-top: 0.5em;
padding: 0.5em;
background-color: #fff;
border-radius: 15px;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
box-shadow: inset 0px 2px 13px #999;
-moz-box-shadow: inset 0px 2px 13px #999;
-webkit-box-shadow: inset 0px 2px 13px #999;
}
#qunit-tests table {
border-collapse: collapse;
margin-top: .2em;
}
#qunit-tests th {
text-align: right;
vertical-align: top;
padding: 0 .5em 0 0;
}
#qunit-tests td {
vertical-align: top;
}
#qunit-tests pre {
margin: 0;
white-space: pre-wrap;
word-wrap: break-word;
}
#qunit-tests del {
background-color: #e0f2be;
color: #374e0c;
text-decoration: none;
}
#qunit-tests ins {
background-color: #ffcaca;
color: #500;
text-decoration: none;
}
/*** Test Counts */
#qunit-tests b.counts { color: black; }
#qunit-tests b.passed { color: #5E740B; }
#qunit-tests b.failed { color: #710909; }
#qunit-tests li li {
margin: 0.5em;
padding: 0.4em 0.5em 0.4em 0.5em;
background-color: #fff;
border-bottom: none;
list-style-position: inside;
}
/*** Passing Styles */
#qunit-tests li li.pass {
color: #5E740B;
background-color: #fff;
border-left: 26px solid #C6E746;
}
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
#qunit-tests .pass .test-name { color: #366097; }
#qunit-tests .pass .test-actual,
#qunit-tests .pass .test-expected { color: #999999; }
#qunit-banner.qunit-pass { background-color: #C6E746; }
/*** Failing Styles */
#qunit-tests li li.fail {
color: #710909;
background-color: #fff;
border-left: 26px solid #EE5757;
white-space: pre;
}
#qunit-tests > li:last-child {
border-radius: 0 0 15px 15px;
-moz-border-radius: 0 0 15px 15px;
-webkit-border-bottom-right-radius: 15px;
-webkit-border-bottom-left-radius: 15px;
}
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
#qunit-tests .fail .test-name,
#qunit-tests .fail .module-name { color: #000000; }
#qunit-tests .fail .test-actual { color: #EE5757; }
#qunit-tests .fail .test-expected { color: green; }
#qunit-banner.qunit-fail { background-color: #EE5757; }
/** Result */
#qunit-testresult {
padding: 0.5em 0.5em 0.5em 2.5em;
color: #2b81af;
background-color: #D2E0E6;
border-bottom: 1px solid white;
}
#qunit-testresult .module-name {
font-weight: bold;
}
/** Fixture */
#qunit-fixture {
position: absolute;
top: -10000px;
left: -10000px;
width: 1000px;
height: 1000px;
}
This diff is collapsed.
$(function () {
module("FontEngine");
test("namespace", function test_namespace() {
ok(window.Asc !== undefined, "window.Asc must be defined");
ok(window.Asc.FontEngine !== undefined, "window.Asc.FontEngine must be defined");
ok(window.Asc.FontEngine.loadFontsAsync !== undefined, "window.Asc.FontEngine.loadFontsAsync must be defined");
ok(window.Asc.FontEngine.FontManager !== undefined, "window.Asc.FontEngine.FontManager must be defined");
});
asyncTest("loadFontsAsync(single font)", 1, function test_loadFontsAsync() {
window.Asc.FontEngine.loadFontsAsync(["arial"], function () {
equal(1, 1, "single font has been loaded");
start();
});
});
asyncTest("loadFontsAsync(multiple fonts)", 1, function test_loadFontsAsync() {
window.Asc.FontEngine.loadFontsAsync(["Calibri", "CAMBRIA"], function () {
equal(1, 1, "multiple fonts have been loaded");
start();
});
});
var fm;
test("FontManager.Initialize", function test_Initialize() {
fm = new window.Asc.FontEngine.FontManager();
ok(fm.Initialize !== undefined, "method must be defined: Initialize");
ok(fm.SetFont !== undefined, "method must be defined: SetFont");
ok(fm.SetTextMatrix !== undefined, "method must be defined: SetTextMatrix");
ok(fm.MeasureChar !== undefined, "method must be defined: MeasureChar");
ok(fm.DrawText !== undefined, "method must be defined: DrawText");
fm.Initialize();
ok(fm.m_lAscender !== undefined, "member must be defined: m_lAscender");
ok(fm.m_lDescender !== undefined, "member must be defined: m_lDescender");
ok(fm.m_lLineHeight !== undefined, "member must be defined: m_lLineHeight");
ok(fm.m_lUnits_Per_Em !== undefined, "member must be defined: m_lUnits_Per_Em");
});
test("FontManager.SetFont", function test_SetFont() {
fm.SetFont({FontFamily:{Name:"aial", Index:-1}, FontSize:12, Bold:false, Italic:false});
equal(fm.m_lAscender, 1854, "Font Arial, 12: ascender");
equal(fm.m_lDescender, -434, "Font Arial, 12: descender");
equal(fm.m_lLineHeight, 2355, "Font Arial, 12: line height");
equal(fm.m_lUnits_Per_Em, 2048, "Font Arial, 12: units per em");
});
test("FontManager.MeasureChar", function test_MeasureChar() {
var w = fm.MeasureChar("A");
ok(w > 0, "Font Arial, 12: width of letter 'A'");
});
});
This diff is collapsed.
This diff is collapsed.
@ECHO OFF
set YUI_COMPRESSOR=com.yahoo.platform.yui.compressor.Bootstrap
SET XREGEXP_SRC_FOLDER=.\src
SET XREGEXP_INPUT_FILES=^
%XREGEXP_SRC_FOLDER%\xregexp.js ^
%XREGEXP_SRC_FOLDER%\addons\prototypes.js ^
%XREGEXP_SRC_FOLDER%\addons\unicode\unicode-base.js ^
%XREGEXP_SRC_FOLDER%\addons\unicode\unicode-categories.js
SET XREGEXP_OUTPUT_FILE=".\xregexp-all-min.js"
if exist %XREGEXP_OUTPUT_FILE% (
DEL %XREGEXP_OUTPUT_FILE% /Q || exit /b 1
)
for %%i in (%XREGEXP_INPUT_FILES%) do (
java %YUI_COMPRESSOR% "%%~i" >> "%XREGEXP_OUTPUT_FILE%"
if errorlevel 1 (
echo CSS compression failed^^!
exit /b 1
)
)
ECHO Script finished successfuly!
pause
/*!
* XRegExp.build 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan 2012 MIT License
* Inspired by Lea Verou's RegExp.create <http://lea.verou.me/>
*/
(function(XRegExp) {
'use strict';
var REGEX_DATA = 'xregexp',
subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,
parts = XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/, subParts], 'g');
/**
* Strips a leading `^` and trailing unescaped `$`, if both are present.
* @private
* @param {String} pattern Pattern to process.
* @returns {String} Pattern with edge anchors removed.
*/
function deanchor(pattern) {
var startAnchor = /^(?:\(\?:\))*\^/, // Leading `^` or `(?:)^` (handles token cruft)
endAnchor = /\$(?:\(\?:\))*$/; // Trailing `$` or `$(?:)` (handles token cruft)
// Ensure that the trailing `$` isn't escaped
if (startAnchor.test(pattern) && endAnchor.test(pattern.replace(/\\[\s\S]/g, ''))) {
return pattern.replace(startAnchor, '').replace(endAnchor, '');
}
return pattern;
}
/**
* Converts the provided value to an XRegExp. Native RegExp flags are not preserved.
* @private
* @param {String|RegExp} value Value to convert.
* @returns {RegExp} XRegExp object with XRegExp syntax applied.
*/
function asXRegExp(value) {
return XRegExp.isRegExp(value) ?
(value[REGEX_DATA] && !value[REGEX_DATA].isNative ?
value : // No need to recompile
XRegExp(value.source) // Recompile native RegExp as XRegExp
) :
XRegExp(value); // Compile string as XRegExp
}
/**
* Builds regexes using named subpatterns, for readability and pattern reuse. Backreferences in the
* outer pattern and provided subpatterns are automatically renumbered to work correctly. Native
* flags used by provided subpatterns are ignored in favor of the `flags` argument.
* @memberOf XRegExp
* @param {String} pattern XRegExp pattern using `{{name}}` for embedded subpatterns. Allows
* `({{name}})` as shorthand for `(?<name>{{name}})`. Patterns cannot be embedded within
* character classes.
* @param {Object} subs Lookup object for named subpatterns. Values can be strings or regexes. A
* leading `^` and trailing unescaped `$` are stripped from subpatterns, if both are present.
* @param {String} [flags] Any combination of XRegExp flags.
* @returns {RegExp} Regex with interpolated subpatterns.
* @example
*
* var time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', {
* hours: XRegExp.build('{{h12}} : | {{h24}}', {
* h12: /1[0-2]|0?[1-9]/,
* h24: /2[0-3]|[01][0-9]/
* }, 'x'),
* minutes: /^[0-5][0-9]$/
* });
* time.test('10:59'); // -> true
* XRegExp.exec('10:59', time).minutes; // -> '59'
*/
XRegExp.build = function(pattern, subs, flags) {
var inlineFlags = /^\(\?([\w$]+)\)/.exec(pattern),
data = {},
numCaps = 0, // 'Caps' is short for captures
numPriorCaps,
numOuterCaps = 0,
outerCapsMap = [0],
outerCapNames,
sub,
p;
// Add flags within a leading mode modifier to the overall pattern's flags
if (inlineFlags) {
flags = flags || '';
inlineFlags[1].replace(/./g, function(flag) {
// Don't add duplicates
flags += (flags.indexOf(flag) > -1 ? '' : flag);
});
}
for (p in subs) {
if (subs.hasOwnProperty(p)) {
// Passing to XRegExp enables extended syntax and ensures independent validity,
// lest an unescaped `(`, `)`, `[`, or trailing `\` breaks the `(?:)` wrapper. For
// subpatterns provided as native regexes, it dies on octals and adds the property
// used to hold extended regex instance data, for simplicity
sub = asXRegExp(subs[p]);
data[p] = {
// Deanchoring allows embedding independently useful anchored regexes. If you
// really need to keep your anchors, double them (i.e., `^^...$$`)
pattern: deanchor(sub.source),
names: sub[REGEX_DATA].captureNames || []
};
}
}
// Passing to XRegExp dies on octals and ensures the outer pattern is independently valid;
// helps keep this simple. Named captures will be put back
pattern = asXRegExp(pattern);
outerCapNames = pattern[REGEX_DATA].captureNames || [];
pattern = pattern.source.replace(parts, function($0, $1, $2, $3, $4) {
var subName = $1 || $2, capName, intro;
// Named subpattern
if (subName) {
if (!data.hasOwnProperty(subName)) {
throw new ReferenceError('Undefined property ' + $0);
}
// Named subpattern was wrapped in a capturing group
if ($1) {
capName = outerCapNames[numOuterCaps];
outerCapsMap[++numOuterCaps] = ++numCaps;
// If it's a named group, preserve the name. Otherwise, use the subpattern name
// as the capture name
intro = '(?<' + (capName || subName) + '>';
} else {
intro = '(?:';
}
numPriorCaps = numCaps;
return intro + data[subName].pattern.replace(subParts, function(match, paren, backref) {
// Capturing group
if (paren) {
capName = data[subName].names[numCaps - numPriorCaps];
++numCaps;
// If the current capture has a name, preserve the name
if (capName) {
return '(?<' + capName + '>';
}
// Backreference
} else if (backref) {
// Rewrite the backreference
return '\\' + (+backref + numPriorCaps);
}
return match;
}) + ')';
}
// Capturing group
if ($3) {
capName = outerCapNames[numOuterCaps];
outerCapsMap[++numOuterCaps] = ++numCaps;
// If the current capture has a name, preserve the name
if (capName) {
return '(?<' + capName + '>';
}
// Backreference
} else if ($4) {
// Rewrite the backreference
return '\\' + outerCapsMap[+$4];
}
return $0;
});
return XRegExp(pattern, flags);
};
}(XRegExp));
/*!
* XRegExp.matchRecursive 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan 2009-2012 MIT License
*/
(function(XRegExp) {
'use strict';
/**
* Returns a match detail object composed of the provided values.
* @private
*/
function row(name, value, start, end) {
return {
name: name,
value: value,
start: start,
end: end
};
}
/**
* Returns an array of match strings between outermost left and right delimiters, or an array of
* objects with detailed match parts and position data. An error is thrown if delimiters are
* unbalanced within the data.
* @memberOf XRegExp
* @param {String} str String to search.
* @param {String} left Left delimiter as an XRegExp pattern.
* @param {String} right Right delimiter as an XRegExp pattern.
* @param {String} [flags] Any native or XRegExp flags, used for the left and right delimiters.
* @param {Object} [options] Lets you specify `valueNames` and `escapeChar` options.
* @returns {Array} Array of matches, or an empty array.
* @example
*
* // Basic usage
* var str = '(t((e))s)t()(ing)';
* XRegExp.matchRecursive(str, '\\(', '\\)', 'g');
* // -> ['t((e))s', '', 'ing']
*
* // Extended information mode with valueNames
* str = 'Here is <div> <div>an</div></div> example';
* XRegExp.matchRecursive(str, '<div\\s*>', '</div>', 'gi', {
* valueNames: ['between', 'left', 'match', 'right']
* });
* // -> [
* // {name: 'between', value: 'Here is ', start: 0, end: 8},
* // {name: 'left', value: '<div>', start: 8, end: 13},
* // {name: 'match', value: ' <div>an</div>', start: 13, end: 27},
* // {name: 'right', value: '</div>', start: 27, end: 33},
* // {name: 'between', value: ' example', start: 33, end: 41}
* // ]
*
* // Omitting unneeded parts with null valueNames, and using escapeChar
* str = '...{1}\\{{function(x,y){return y+x;}}';
* XRegExp.matchRecursive(str, '{', '}', 'g', {
* valueNames: ['literal', null, 'value', null],
* escapeChar: '\\'
* });
* // -> [
* // {name: 'literal', value: '...', start: 0, end: 3},
* // {name: 'value', value: '1', start: 4, end: 5},
* // {name: 'literal', value: '\\{', start: 6, end: 8},
* // {name: 'value', value: 'function(x,y){return y+x;}', start: 9, end: 35}
* // ]
*
* // Sticky mode via flag y
* str = '<1><<<2>>><3>4<5>';
* XRegExp.matchRecursive(str, '<', '>', 'gy');
* // -> ['1', '<<2>>', '3']
*/
XRegExp.matchRecursive = function(str, left, right, flags, options) {
flags = flags || '';
options = options || {};
var global = flags.indexOf('g') > -1,
sticky = flags.indexOf('y') > -1,
// Flag `y` is controlled internally
basicFlags = flags.replace(/y/g, ''),
escapeChar = options.escapeChar,
vN = options.valueNames,
output = [],
openTokens = 0,
delimStart = 0,
delimEnd = 0,
lastOuterEnd = 0,
outerStart,
innerStart,
leftMatch,
rightMatch,
esc;
left = XRegExp(left, basicFlags);
right = XRegExp(right, basicFlags);
if (escapeChar) {
if (escapeChar.length > 1) {
throw new Error('Cannot use more than one escape character');
}
escapeChar = XRegExp.escape(escapeChar);
// Using `XRegExp.union` safely rewrites backreferences in `left` and `right`
esc = new RegExp(
'(?:' + escapeChar + '[\\S\\s]|(?:(?!' +
XRegExp.union([left, right]).source +
')[^' + escapeChar + '])+)+',
// Flags `gy` not needed here
flags.replace(/[^im]+/g, '')
);
}
while (true) {
// If using an escape character, advance to the delimiter's next starting position,
// skipping any escaped characters in between
if (escapeChar) {
delimEnd += (XRegExp.exec(str, esc, delimEnd, 'sticky') || [''])[0].length;
}
leftMatch = XRegExp.exec(str, left, delimEnd);
rightMatch = XRegExp.exec(str, right, delimEnd);
// Keep the leftmost match only
if (leftMatch && rightMatch) {
if (leftMatch.index <= rightMatch.index) {
rightMatch = null;
} else {
leftMatch = null;
}
}
/* Paths (LM: leftMatch, RM: rightMatch, OT: openTokens):
* LM | RM | OT | Result
* 1 | 0 | 1 | loop
* 1 | 0 | 0 | loop
* 0 | 1 | 1 | loop
* 0 | 1 | 0 | throw
* 0 | 0 | 1 | throw
* 0 | 0 | 0 | break
* Doesn't include the sticky mode special case. The loop ends after the first
* completed match if not `global`.
*/
if (leftMatch || rightMatch) {
delimStart = (leftMatch || rightMatch).index;
delimEnd = delimStart + (leftMatch || rightMatch)[0].length;
} else if (!openTokens) {
break;
}
if (sticky && !openTokens && delimStart > lastOuterEnd) {
break;
}
if (leftMatch) {
if (!openTokens) {
outerStart = delimStart;
innerStart = delimEnd;
}
++openTokens;
} else if (rightMatch && openTokens) {
if (!--openTokens) {
if (vN) {
if (vN[0] && outerStart > lastOuterEnd) {
output.push(row(vN[0], str.slice(lastOuterEnd, outerStart), lastOuterEnd, outerStart));
}
if (vN[1]) {
output.push(row(vN[1], str.slice(outerStart, innerStart), outerStart, innerStart));
}
if (vN[2]) {
output.push(row(vN[2], str.slice(innerStart, delimStart), innerStart, delimStart));
}
if (vN[3]) {
output.push(row(vN[3], str.slice(delimStart, delimEnd), delimStart, delimEnd));
}
} else {
output.push(str.slice(innerStart, delimStart));
}
lastOuterEnd = delimEnd;
if (!global) {
break;
}
}
} else {
throw new Error('Unbalanced delimiter found in string');
}
// If the delimiter matched an empty string, avoid an infinite loop
if (delimStart === delimEnd) {
++delimEnd;
}
}
if (global && !sticky && vN && vN[0] && str.length > lastOuterEnd) {
output.push(row(vN[0], str.slice(lastOuterEnd), lastOuterEnd, str.length));
}
return output;
};
}(XRegExp));
/*!
* XRegExp Prototypes 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan 2012 MIT License
*/
/**
* Adds a collection of methods to `XRegExp.prototype`. RegExp objects copied by XRegExp are also
* augmented with any `XRegExp.prototype` methods. Hence, the following work equivalently:
*
* XRegExp('[a-z]', 'ig').xexec('abc');
* XRegExp(/[a-z]/ig).xexec('abc');
* XRegExp.globalize(/[a-z]/i).xexec('abc');
*/
(function(XRegExp) {
'use strict';
// Shortcut
var proto = XRegExp.prototype;
/**
* Implicitly calls the regex's `test` method with the first value in the provided `args` array.
* @memberOf XRegExp.prototype
* @param {*} context Ignored. Accepted only for congruity with `Function.prototype.apply`.
* @param {Array} args Array with the string to search as its first value.
* @returns {Boolean} Whether the regex matched the provided value.
* @example
*
* XRegExp('[a-z]').apply(null, ['abc']); // -> true
*/
proto.apply = function(context, args) {
return this.test(args[0]);
};
/**
* Implicitly calls the regex's `test` method with the provided string.
* @memberOf XRegExp.prototype
* @param {*} context Ignored. Accepted only for congruity with `Function.prototype.call`.
* @param {String} str String to search.
* @returns {Boolean} Whether the regex matched the provided value.
* @example
*
* XRegExp('[a-z]').call(null, 'abc'); // -> true
*/
proto.call = function(context, str) {
return this.test(str);
};
/**
* Implicitly calls {@link #XRegExp.forEach}.
* @memberOf XRegExp.prototype
* @example
*
* XRegExp('\\d').forEach('1a2345', function(match, i) {
* if (i % 2) this.push(+match[0]);
* }, []);
* // -> [2, 4]
*/
proto.forEach = function(str, callback, context) {
return XRegExp.forEach(str, this, callback, context);
};
/**
* Implicitly calls {@link #XRegExp.globalize}.
* @memberOf XRegExp.prototype
* @example
*
* var globalCopy = XRegExp('regex').globalize();
* globalCopy.global; // -> true
*/
proto.globalize = function() {
return XRegExp.globalize(this);
};
/**
* Implicitly calls {@link #XRegExp.match}.
* @memberOf XRegExp.prototype
* @example
*
* XRegExp('\\d').match('1a23', 'all');
* // -> ['1', '2', '3']
*/
proto.match = function(str, scope) {
return XRegExp.match(str, this, scope);
};
/**
* Implicitly calls {@link #XRegExp.exec}.
* @memberOf XRegExp.prototype
* @example
*
* var match = XRegExp('U\\+(?<hex>[0-9A-F]{4})').xexec('U+2620');
* match.hex; // -> '2620'
*/
proto.xexec = function(str, pos, sticky) {
return XRegExp.exec(str, this, pos, sticky);
};
/**
* Implicitly calls {@link #XRegExp.test}.
* @memberOf XRegExp.prototype
* @example
*
* XRegExp('c').xtest('abc'); // -> true
*/
proto.xtest = function(str, pos, sticky) {
return XRegExp.test(str, this, pos, sticky);
};
}(XRegExp));
/*!
* XRegExp BackCompat 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan 2012 MIT License
*/
/**
* Provides backward compatibility with XRegExp 1.x-2.x.
*/
(function(XRegExp) {
'use strict';
var REGEX_DATA = 'xregexp',
install = XRegExp.install,
uninstall = XRegExp.uninstall;
/**
* XRegExp 3.0.0 removed the 'all' shortcut.
*/
XRegExp.install = function(options) {
install(options === 'all' ? 'natives' : options);
};
/**
* XRegExp 3.0.0 removed the 'all' shortcut.
*/
XRegExp.uninstall = function(options) {
uninstall(options === 'all' ? 'natives' : options);
};
/**
* XRegExp 2.0.0 stopped overriding native methods by default.
*/
XRegExp.install('natives');
/**
* @deprecated As of XRegExp 2.0.0. Replaced by {@link #XRegExp.globalize}.
*/
XRegExp.copyAsGlobal = XRegExp.globalize;
/**
* @deprecated As of XRegExp 2.0.0. Replaced by {@link #XRegExp.exec}.
*/
XRegExp.execAt = XRegExp.exec;
/**
* @deprecated As of XRegExp 2.0.0. Replaced by {@link #XRegExp.forEach}.
*/
XRegExp.iterate = XRegExp.forEach;
/**
* @deprecated As of XRegExp 2.0.0. No replacement.
*/
XRegExp.freezeTokens = function() {
XRegExp.addToken = function() {
throw new Error('Cannot run addToken after freezeTokens');
};
};
/**
* @deprecated As of XRegExp 2.0.0. Replaced by {@link #XRegExp.prototype.apply} in addon.
*/
RegExp.prototype.apply = function(context, args) {
return this.test(args[0]);
};
/**
* @deprecated As of XRegExp 2.0.0. Replaced by {@link #XRegExp.prototype.call} in addon.
*/
RegExp.prototype.call = function(context, str) {
return this.test(str);
};
/**
* @deprecated As of XRegExp 1.5.0. Replaced by {@link #XRegExp.matchChain}.
*/
XRegExp.matchWithinChain = XRegExp.matchChain;
/**
* @deprecated As of XRegExp 1.5.0. No replacement.
*/
RegExp.prototype.addFlags = function(flags) {
var regex = XRegExp(
this.source,
/\/([a-z]*)$/i.exec(String(this))[1] + (flags || '')
),
captureNames = this[REGEX_DATA] ? this[REGEX_DATA].captureNames : null;
regex[REGEX_DATA] = {
captureNames: captureNames ? captureNames.slice(0) : null,
isNative: false // Always passed through `XRegExp`
};
return regex;
};
/**
* @deprecated As of XRegExp 1.5.0. No replacement.
*/
RegExp.prototype.forEachExec = function(str, callback, context) {
XRegExp.forEach(str, this, callback, context);
};
/**
* @deprecated As of XRegExp 1.5.0. No replacement.
*/
RegExp.prototype.validate = function(str) {
var regex = new RegExp(
'^(?:' + this.source + ')$(?!\\s)',
/\/([a-z]*)$/i.exec(String(this))[1]
);
if (this.global) {
this.lastIndex = 0;
}
return str.search(regex) === 0;
};
/**
* @deprecated As of XRegExp 1.2.0. No replacement.
*/
RegExp.prototype.execAll = function(str) {
return XRegExp.forEach(str, this, function(match) {
this.push(match);
}, []);
};
}(XRegExp));
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
//Tihs file containes definition of object which used in api.js
//It need to prevent minimize the name of object's method.
function $(){};
function DE(){};
function SE(){};
function SSE(){};
function PE(){};
function Ext(){};
function FB(){};
function twttr(){};
function _gaq(){};
/**
* @license Copyright (c) Ascensio System SIA 2012-2013. All rights reserved
*
* http://www.teamlab.com
*
* Version: @@Version (build:@@Build)
*/
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/**
* Modal Dialog
*/
.modalBg {
position: absolute;
top: 0px;
left: 0px;
filter: Alpha(Opacity=50);
-moz-opacity: 0.5;
background-color: #ddd;
visibility: hidden;
width: expression(document.body.clientWidth);
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight);
z-index: 100;
}
.modalDialog {
position: absolute;
top: 0px;
left: 0px;
visibility: hidden;
z-index: 101;
background-color: white;
top: expression(document.body.clientHeight / 2 - this.offsetHeight / 2);
left: expression(document.body.clientWidth / 2 - this.offsetWidth / 2);
border: 1px solid #777;
border-top: 0;
padding: 20px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
.modalDialog .modalDialogHeader {
margin:0;
padding: 0px;
color: #333;
font-weight: bold;
background-color: #ccc;
border: 1px solid #989898;
position: absolute;
top: 0px;
left: -1px;
height: 7px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius-bottomleft: 0;
-moz-border-radius-bottomright: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.modalShadow {
position: absolute;
background-color: black;
top: 0px;
left: 0px;
z-index: 99;
top: expression(document.body.clientHeight / 2 - this.offsetHeight / 2);
left: expression(document.body.clientWidth / 2 - this.offsetWidth / 2);
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
opacity: 0.5;
}
/**
* This is not part of the core Modal Dialog styles, instead it's just so that the dialog looks
* respectable.
*/
h4 {
font-family: Verdana, Arial;
padding-top: 10px;
}
\ No newline at end of file
This diff is collapsed.
<?php
header('Location: /');
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<!--
/**
* o------------------------------------------------------------------------------o
* | This file is part of the OfficeExcel package - you can learn more at: |
* | |
* | http://www.OfficeExcel.net |
* | |
* | This package is licensed under the OfficeExcel license. For all kinds of business |
* | purposes there is a small one-time licensing fee to pay and for non |
* | commercial purposes it is free to use. You can read the full license here: |
* | |
* | http://www.OfficeExcel.net/LICENSE.txt |
* o------------------------------------------------------------------------------o
*/
-->
<title>Adjusting your charts interactively</title>
<meta name="keywords" content="OfficeExcel html5 canvas charts adjusting docs " />
<meta name="description" content="Information about adjusting your charts interactively" />
<meta name="googlebot" content="NOODP">
<meta property="og:title" content="OfficeExcel: HTML5 Javascript charts library" />
<meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
<meta property="og:image" content="http://www.OfficeExcel.net/images/logo.png"/>
<link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
<link rel="icon" type="image/png" href="../images/favicon.png">
<!-- Place this tag in your head or just before your close body tag -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<script src="../libraries/OfficeExcel.common.core.js" ></script>
<?php PrintAnalyticsCode() ?>
</head>
<body>
<!-- Social networking buttons -->
<?php
$prefix = substr($_SERVER['SERVER_NAME'], 0, 3);
require("/OfficeExcel.{$prefix}/social.html");
?>
<!-- Social networking buttons -->
<div id="breadcrumb">
<a href="../index.html">OfficeExcel: HTML5 Javascript charts library</a>
>
<a href="./index.html">Documentation</a>
>
Adjusting charts interactively
</div>
<h1>Adjusting <span>your charts interactively</span></h1>
<script>
if (OfficeExcel.isOld()) {
document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the OfficeExcel Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag.</div>');
}
</script>
<div style="float: left"></div>
<p>
Since 24th May 2010 you have had the ability to adjust your so if you want to see the charts interactively. Currently the Bar chart, Line chart,
Progress Bar and the Radar have this facility. Some chart types use multiple event handlers and as such
are unlikely to work well with other dynamic features. The Line chart is an example of this, and whilst it does work
with the context menu (and so the full canvas zoom), it is unlikely to work with other dynamic features.
</p>
<p>
At the current time this feature on the Bar and Line charts doesn't work with X axis in the center.
</p>
<p>
If your intention is to make some sort of interactive console, new HTML5 input types may also be of interest (for example the new <i>range</i> input type
which gives you a "slider bar"). Eg (Chrome/Safari/Opera):
</p>
<p style="text-align: center">
<input type="range" min="0" max="100" value="76" onchange="document.getElementById('range_result').value = this.value"/>
<input type="text" id="range_result" size="3" value="76" />
</p>
<h4>Note</h4>
<p>
Since interactivly adjusting a chart involves completely redrawing it, having a lot of them on one page can cause
slower updates. For this reason each example chart is on its own page:
</p>
<ul>
<li><a href="adjusting_bar.html">Bar chart</a></li>
<li><a href="adjusting_gantt.html">Gantt chart</a></li>
<li><a href="adjusting_hprogress.html">HProgress bar</a></li>
<li><a href="adjusting_line.html">Line chart</a></li>
<li><a href="adjusting_radar.html">Radar chart</a></li>
<li><a href="adjusting_thermometer.html">Thermometer chart</a></li>
<li><a href="adjusting_vprogress.html">VProgress bar</a></li>
</ul>
<h4>DOM2 event handlers</h4>
<p>
In January 2011 all adjusting was converted to DOM2 event handling. This makes adjusting work much better with other
dynamic features.
</p>
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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