How to use this.setValue method in Appium Xcuitest Driver

Best JavaScript code snippet using appium-xcuitest-driver

ShuffleGameLibrary.js

Source:ShuffleGameLibrary.js Github

copy

Full Screen

1(function() {2 ////////////////////////////////////////////////////////////////////////////////3 // global.GameUtils4 var $global__ = function() {5 };6 $global__.numbers = function(start, finish) {7 var items = new Array(finish - start);8 for (var i = 0; i < finish - start; i++) {9 items[i] = start + i;10 }11 return items;12 };13 $global__.clone = function(obj) {14 if (!!(ss.isNullOrUndefined(obj) || !ss.isInstanceOfType(obj, Array) && (!ss.referenceEquals(ss.getInstanceType(obj), Object) && eval('({}).toString.call(obj) != \'[object Function]\'')))) {15 return obj;16 }17 var ob = obj;18 var temp = null;19 //::dynamic okay20 if (ss.isInstanceOfType(obj, Array)) {21 temp = [];22 }23 else {24 temp = new Object();25 }26 var $t1 = ss.getEnumerator(Object.keys(ob));27 try {28 while ($t1.moveNext()) {29 var key = $t1.current();30 temp[key] = $global__.clone(ob[key]);31 }32 }33 finally {34 $t1.dispose();35 }36 return temp;37 };38 $global__.floor = function(j) {39 return ss.Int32.trunc(j);40 };41 $global__.random = function() {42 return Math.random();43 };44 ////////////////////////////////////////////////////////////////////////////////45 // global.CardGameAppearanceAnimatedEffect46 var $global_AnimatedEffect = function(animationEffectType, duration, ease) {47 this.type = 0;48 this.duration = 0;49 this.pauseAfter = 0;50 this.pauseBefore = 0;51 this.ease = 0;52 $global_Effect.call(this, 4);53 this.ease = ease;54 this.type = animationEffectType;55 this.duration = duration;56 };57 ////////////////////////////////////////////////////////////////////////////////58 // global.CardGameAppearanceAnimatedEffectBetweenProperties59 var $global_AnimatedEffect$Between = function(duration, ease) {60 this.from = null;61 this.to = null;62 $global_AnimatedEffect.call(this, 0, duration, ease);63 this.from = new $global_Effect$StyleProperty(new $global_AppearanceStyle());64 this.to = new $global_Effect$StyleProperty(new $global_AppearanceStyle());65 };66 ////////////////////////////////////////////////////////////////////////////////67 // global.CardGameAppearanceAnimatedEffectEase68 var $global_AnimatedEffectEase = function() {69 };70 $global_AnimatedEffectEase.prototype = { linear: 0, swing: 1, easeInQuad: 2, easeOutQuad: 3, easeInOutQuad: 4, easeInCubic: 5, easeOutCubic: 6, easeInOutCubic: 7, easeInQuart: 8, easeOutQuart: 9, easeInOutQuart: 10, easeInQuint: 11, easeOutQuint: 12, easeInOutQuint: 13, easeInSine: 14, easeOutSine: 15, easeInOutSine: 16, easeInExpo: 17, easeOutExpo: 18, easeInOutExpo: 19, easeInCirc: 20, easeOutCirc: 21, easeInOutCirc: 22, easeInElastic: 23, easeOutElastic: 24, easeInOutElastic: 25, easeInBack: 26, easeOutBack: 27, easeInOutBack: 28, easeInBounce: 29, easeOutBounce: 30, easeInOutBounce: 31 };71 ss.registerEnum(global, 'global.AnimatedEffectEase', $global_AnimatedEffectEase, false);72 ////////////////////////////////////////////////////////////////////////////////73 // global.CardGameAppearanceAnimatedEffectType74 var $global_AnimatedEffectType = function() {75 };76 $global_AnimatedEffectType.prototype = { between: 0 };77 ss.registerEnum(global, 'global.AnimatedEffectType', $global_AnimatedEffectType, false);78 ////////////////////////////////////////////////////////////////////////////////79 // global.CardGameAppearance80 var $global_Appearance = function() {81 this.effects = null;82 $global_AppearanceStyle.call(this);83 this.effects = [];84 };85 $global_Appearance.fromJson = function(json) {86 var ap = new $global_Appearance();87 ap.innerStyle = $global_AppearanceStyleItem.fromJson(json.innerStyle);88 ap.outerStyle = $global_AppearanceStyleItem.fromJson(json.outerStyle);89 ap.effects = [];90 if (ss.isValue(json.effects)) {91 for (var $t1 = 0; $t1 < json.effects.length; $t1++) {92 var effect = json.effects[$t1];93 ss.add(ap.effects, $global_Effect.fromJson(effect));94 }95 }96 return ap;97 };98 ////////////////////////////////////////////////////////////////////////////////99 // global.CardGameAppearanceStyle100 var $global_AppearanceStyle = function() {101 this.outerStyle = null;102 this.innerStyle = null;103 this.outerStyle = new $global_AppearanceStyleItem({});104 this.innerStyle = new $global_AppearanceStyleItem({});105 };106 $global_AppearanceStyle.$ctor1 = function(outersStyle, innerStyle) {107 this.outerStyle = null;108 this.innerStyle = null;109 this.outerStyle = outersStyle;110 this.innerStyle = innerStyle;111 };112 $global_AppearanceStyle.$ctor1.prototype = $global_AppearanceStyle.prototype;113 ////////////////////////////////////////////////////////////////////////////////114 // global.CardGameAppearanceStyleBorder115 var $global_AppearanceStyleBorder = function() {116 this.top = null;117 this.bottom = null;118 this.left = null;119 this.right = null;120 this.all = null;121 this.top = new $global_AppearanceStyleBorderArea();122 this.bottom = new $global_AppearanceStyleBorderArea();123 this.left = new $global_AppearanceStyleBorderArea();124 this.right = new $global_AppearanceStyleBorderArea();125 this.all = new $global_AppearanceStyleBorderArea();126 };127 $global_AppearanceStyleBorder.fromJson = function(st) {128 var sp = new $global_AppearanceStyleBorder();129 sp.all = st.all;130 sp.bottom = st.bottom;131 sp.left = st.left;132 sp.right = st.right;133 sp.top = st.top;134 return sp;135 };136 ////////////////////////////////////////////////////////////////////////////////137 // global.CardGameAppearanceStyleBorderArea138 var $global_AppearanceStyleBorderArea = function() {139 this.color = null;140 this.radius = null;141 this.width = null;142 this.style = 0;143 this.color = '#FFF';144 this.radius = '0px';145 this.width = '0px';146 this.style = 0;147 };148 ////////////////////////////////////////////////////////////////////////////////149 // global.CardGameAppearanceStyleCursor150 var $global_AppearanceStyleCursor = function() {151 };152 $global_AppearanceStyleCursor.prototype = { default: 'default', auto: 'auto', pointer: 'pointer', move: 'move', eResize: 'eResize', neResize: 'neResize', nwResize: 'nwResize', nResize: 'nResize', seResize: 'seResize', swResize: 'swResize', sResize: 'sResize', wResize: 'wResize', text: 'text', wait: 'wait', help: 'help' };153 ss.registerEnum(global, 'global.AppearanceStyleCursor', $global_AppearanceStyleCursor, false);154 ////////////////////////////////////////////////////////////////////////////////155 // global.CardGameAppearanceStyleItem156 var $global_AppearanceStyleItem = function(options) {157 this.backColor = null;158 this.rotate = 0;159 this.border = null;160 this.padding = null;161 this.margin = null;162 this.zindex = 0;163 this.cursor = 0;164 if (!!ss.isNullOrUndefined(options)) {165 options = {};166 }167 this.backColor = ss.cast(ss.coalesce(options.backColor, null), String);168 this.zindex = ss.Nullable.unbox(ss.cast(ss.coalesce(options.zIndex, 0), ss.Int32));169 var $t1 = options.border;170 if (ss.isNullOrUndefined($t1)) {171 $t1 = new $global_AppearanceStyleBorder();172 }173 this.border = ss.cast($t1, $global_AppearanceStyleBorder);174 var $t2 = options.padding;175 if (ss.isNullOrUndefined($t2)) {176 $t2 = new $global_AppearanceStylePadding();177 }178 this.padding = ss.cast($t2, $global_AppearanceStylePadding);179 var $t3 = options.margin;180 if (ss.isNullOrUndefined($t3)) {181 $t3 = new $global_AppearanceStyleMargin();182 }183 this.margin = ss.cast($t3, $global_AppearanceStyleMargin);184 this.cursor = ss.cast(ss.coalesce(options.cursor, 0), ss.Int32);185 this.rotate = 0;186 };187 $global_AppearanceStyleItem.fromJson = function(st) {188 var si = new $global_AppearanceStyleItem({});189 si.backColor = st.backColor;190 si.border = $global_AppearanceStyleBorder.fromJson(st.border);191 si.cursor = st.cursor;192 si.margin = $global_AppearanceStyleMargin.fromJson(st.margin);193 si.padding = $global_AppearanceStylePadding.fromJson(st.padding);194 si.rotate = st.rotate;195 si.zindex = st.zindex;196 return si;197 };198 ////////////////////////////////////////////////////////////////////////////////199 // global.CardGameAppearanceStyleMargin200 var $global_AppearanceStyleMargin = function() {201 this.top = 0;202 this.bottom = 0;203 this.left = 0;204 this.right = 0;205 this.all = 0;206 this.top = 0;207 this.bottom = 0;208 this.left = 0;209 this.right = 0;210 this.all = 0;211 };212 $global_AppearanceStyleMargin.fromJson = function(st) {213 var sp = new $global_AppearanceStyleMargin();214 sp.all = st.all;215 sp.bottom = st.bottom;216 sp.left = st.left;217 sp.right = st.right;218 sp.top = st.top;219 return sp;220 };221 ////////////////////////////////////////////////////////////////////////////////222 // global.CardGameAppearanceStylePadding223 var $global_AppearanceStylePadding = function() {224 this.top = 0;225 this.bottom = 0;226 this.left = 0;227 this.right = 0;228 this.all = 0;229 this.top = 0;230 this.bottom = 0;231 this.left = 0;232 this.right = 0;233 this.all = 0;234 };235 $global_AppearanceStylePadding.fromJson = function(st) {236 var sp = new $global_AppearanceStylePadding();237 sp.all = st.all;238 sp.bottom = st.bottom;239 sp.left = st.left;240 sp.right = st.right;241 sp.top = st.top;242 return sp;243 };244 ////////////////////////////////////////////////////////////////////////////////245 // global.ArrayUtils246 var $global_ArrayUtils = function() {247 };248 $global_ArrayUtils.forEach = function(ts, does) {249 for (var i = 0; i < ts.length; i++) {250 var df = does(ts[i], i);251 if (df) {252 return df;253 }254 }255 return false;256 };257 $global_ArrayUtils.select = function(T, T2) {258 return function(ts, does) {259 var ts2 = new Array(ts.length);260 for (var i = 0; i < ts.length; i++) {261 ts2[i] = does(ts[i]);262 }263 return ts2;264 };265 };266 $global_ArrayUtils.sortCards = function(ts) {267 var ijc = $global_ArrayUtils.groupBy($global_Card, ss.Int32).call(null, ts, function(a) {268 return a.type;269 });270 var ij = $global_ArrayUtils.select(ss.makeGenericType($global_ArrayUtils$GroupByKey$2, [$global_Card, ss.Int32]), Array).call(null, ijc, function(a1) {271 a1.items.sort(function(b, c) {272 return b.value - c.value;273 });274 return a1.items;275 });276 var items = new Array(ts.length);277 var jf = 0;278 for (var $t1 = 0; $t1 < ij.length; $t1++) {279 var cardGameCard = ij[$t1];280 for (var $t2 = 0; $t2 < cardGameCard.length; $t2++) {281 var gameCard = cardGameCard[$t2];282 items[jf++] = gameCard;283 }284 }285 $global_ArrayUtils.$setArrayData($global_Card).call(null, ts, items);286 return ts;287 };288 $global_ArrayUtils.$setArrayData = function(T) {289 return function(ts, items) {290 for (var i = 0; i < items.length; i++) {291 ts[i] = items[i];292 }293 };294 };295 $global_ArrayUtils.groupBy = function(T, T2) {296 return function(ts, does) {297 var items = [];298 for (var $t1 = 0; $t1 < ts.length; $t1++) {299 var t = ts[$t1];300 var t2 = does(t);301 var good = false;302 for (var $t2 = 0; $t2 < items.length; $t2++) {303 var item = items[$t2];304 var f3 = !!eval('item.key==t2');305 //throws wild notimplementedexcpetion if item.key and t2 are cast to dynamic306 if (f3) {307 ss.add(item.items, t);308 good = true;309 break;310 }311 }312 if (!good) {313 ss.add(items, new (ss.makeGenericType($global_ArrayUtils$GroupByKey$2, [T, T2]))(t2, [t]));314 }315 }316 return ss.cast(items, Array);317 };318 };319 $global_ArrayUtils.where = function(ts, does) {320 var jf = [];321 for (var i = 0; i < ts.length; i++) {322 if (does(ts[i], i)) {323 ss.add(jf, ts[i]);324 }325 }326 return jf;327 };328 $global_ArrayUtils.any = function(ts, does) {329 var jf = [];330 for (var i = 0; i < ts.length; i++) {331 if (does(ts[i], i)) {332 return true;333 }334 }335 return false;336 };337 ////////////////////////////////////////////////////////////////////////////////338 // global.ArrayUtils.GroupByKey339 var $global_ArrayUtils$GroupByKey$2 = function(T, T2) {340 var $type = function(key, items) {341 this.key = ss.getDefaultValue(T2);342 this.items = null;343 this.key = key;344 this.items = items;345 };346 ss.registerGenericClassInstance($type, $global_ArrayUtils$GroupByKey$2, [T, T2], function() {347 return Object;348 }, function() {349 return [];350 });351 return $type;352 };353 ss.registerGenericClass(global, 'global.ArrayUtils$GroupByKey$2', $global_ArrayUtils$GroupByKey$2, 2);354 ////////////////////////////////////////////////////////////////////////////////355 // global.CardGameCard356 var $global_Card = function(value, type) {357 this.value = 0;358 this.type = 0;359 this.state = 0;360 this.appearance = null;361 this.value = value;362 this.type = type;363 this.appearance = new $global_Appearance();364 };365 ////////////////////////////////////////////////////////////////////////////////366 // global.CardDrawing367 var $global_CardDrawing = function(item1) {368 this.outerElement = null;369 this.outerElementStyle = null;370 this.outerElement = item1;371 this.outerElementStyle = new $global_InternalStyle();372 };373 ////////////////////////////////////////////////////////////////////////////////374 // global.GameCardGame375 var $global_CardGame = function(options) {376 this.emulating = false;377 this.name = null;378 this.answerIndex = 0;379 this.spaces = null;380 this.textAreas = null;381 this.size = null;382 this.answers = null;383 this.users = null;384 this.deck = null;385 this.numberOfCards = 0;386 this.numberOfJokers = 0;387 this.spaces = [];388 this.textAreas = [];389 this.answers = [];390 this.users = [];391 this.numberOfCards = ((options.numberOfCards === 0) ? 52 : options.numberOfCards);392 this.numberOfJokers = ((options.numberOfJokers === 0) ? 52 : options.numberOfJokers);393 this.deck = new $global_Pile('deck');394 for (var i = 0; i < this.numberOfCards; i++) {395 ss.add(this.deck.cards, new $global_Card(i % 13, ss.Int32.trunc(Math.floor(ss.Int32.div(i, 13)))));396 }397 for (var i1 = 0; i1 < this.numberOfJokers; i1++) {398 ss.add(this.deck.cards, new $global_Card(0, 0));399 }400 this.size = options.size || CommonLibraries.Size.$ctor1(15, 15);401 //402 // 403 //404 // this.setAnswers = function (answers) {405 //406 // 407 //408 // this.answers = answers;409 //410 // 411 //412 // };413 };414 $global_CardGame.prototype = {415 setAnswers: function(answers) {416 this.answers = answers;417 },418 setPlayers: function(players) {419 this.users = [];420 if (ss.isNullOrUndefined(players) || players.length === 0) {421 return;422 }423 if (players.length > 6) {424 ss.arrayRemoveRange(players, 6, players.length - 6);425 }426 for (var j = 0; j < players.length; j++) {427 ss.add(this.users, new $global_User(players[j].userName));428 }429 },430 dealCards: function(numberOfCards, state) {431 }432 };433 ////////////////////////////////////////////////////////////////////////////////434 // global.CardGameAnswer435 var $global_CardGameAnswer = function() {436 };437 $global_CardGameAnswer.createInstance = function() {438 return $global_CardGameAnswer.$ctor();439 };440 $global_CardGameAnswer.$ctor = function() {441 var $this = {};442 $this.value = 0;443 return $this;444 };445 ////////////////////////////////////////////////////////////////////////////////446 // global.CardGameAppearanceEffectDrawTime447 var $global_CardGameAppearanceEffectDrawTime = function() {448 };449 $global_CardGameAppearanceEffectDrawTime.prototype = { pre: 0, during: 1, post: 2 };450 ss.registerEnum(global, 'global.CardGameAppearanceEffectDrawTime', $global_CardGameAppearanceEffectDrawTime, false);451 ////////////////////////////////////////////////////////////////////////////////452 // global.CardGameAppearanceStyleBorderStyle453 var $global_CardGameAppearanceStyleBorderStyle = function() {454 };455 $global_CardGameAppearanceStyleBorderStyle.prototype = { none: 0, dotted: 1, dashed: 2, solid: 3, double$1: 4, groove: 5, ridge: 6, inset: 7, offset: 8 };456 ss.registerEnum(global, 'global.CardGameAppearanceStyleBorderStyle', $global_CardGameAppearanceStyleBorderStyle, false);457 ////////////////////////////////////////////////////////////////////////////////458 // global.CardGameArea459 var $global_CardGameArea = function() {460 };461 $global_CardGameArea.createInstance = function() {462 return $global_CardGameArea.$ctor();463 };464 $global_CardGameArea.$ctor = function() {465 var $this = {};466 $this.size = null;467 $this.spaces = null;468 $this.textAreas = null;469 return $this;470 };471 ////////////////////////////////////////////////////////////////////////////////472 // global.CardGameEffectBendOptions473 var $global_CardGameEffectBendOptions = function() {474 };475 $global_CardGameEffectBendOptions.createInstance = function() {476 return $global_CardGameEffectBendOptions.$ctor();477 };478 $global_CardGameEffectBendOptions.$ctor = function() {479 var $this = {};480 $this.degrees = 0;481 return $this;482 };483 ////////////////////////////////////////////////////////////////////////////////484 // global.CardGameEffectHighlightOptions485 var $global_CardGameEffectHighlightOptions = function() {486 };487 $global_CardGameEffectHighlightOptions.createInstance = function() {488 return $global_CardGameEffectHighlightOptions.$ctor();489 };490 $global_CardGameEffectHighlightOptions.$ctor = function() {491 var $this = {};492 $this.radius = 0;493 $this.color = null;494 $this.rotate = 0;495 $this.opacity = 0;496 $this.offsetX = 0;497 $this.offsetY = 0;498 return $this;499 };500 ////////////////////////////////////////////////////////////////////////////////501 // global.CardGameEffectRotateOptions502 var $global_CardGameEffectRotateOptions = function() {503 };504 $global_CardGameEffectRotateOptions.createInstance = function() {505 return $global_CardGameEffectRotateOptions.$ctor();506 };507 $global_CardGameEffectRotateOptions.$ctor = function() {508 var $this = {};509 $this.degrees = 0;510 return $this;511 };512 ////////////////////////////////////////////////////////////////////////////////513 // global.CardGameQuestion514 var $global_CardGameQuestion = function(user, question, answers, cardGame) {515 this.user = null;516 this.question = null;517 this.answers = null;518 this.cardGame = null;519 this.user = user;520 this.question = question;521 this.answers = answers;522 this.cardGame = cardGame;523 };524 ////////////////////////////////////////////////////////////////////////////////525 // global.CardGameTableSpaceOptions526 var $global_CardGameTableSpaceOptions = function() {527 this.vertical = false;528 this.x = 0;529 this.y = 0;530 this.width = 0;531 this.height = 0;532 this.pile = null;533 this.rotate = 0;534 this.visible = false;535 this.stackCards = false;536 this.drawCardsBent = false;537 this.name = null;538 this.sortOrder = 0;539 this.numerOfCardsHorizontal = 0;540 this.numerOfCardsVertical = 0;541 this.resizeType = 0;542 this.resizeType = 0;543 this.rotate = 0;544 };545 ////////////////////////////////////////////////////////////////////////////////546 // global.CardGameCardState547 var $global_CardState = function() {548 };549 $global_CardState.prototype = { faceUp: 0, faceDown: 1, faceUpIfOwned: 2 };550 ss.registerEnum(global, 'global.CardState', $global_CardState, false);551 ////////////////////////////////////////////////////////////////////////////////552 // global.CardGameCardType553 var $global_CardType = function() {554 };555 $global_CardType.prototype = { heart: 0, diamond: 1, spade: 2, club: 3 };556 ss.registerEnum(global, 'global.CardType', $global_CardType, false);557 ////////////////////////////////////////////////////////////////////////////////558 // global.DomUtils559 var $global_domUtils = function() {560 };561 $global_domUtils.nopx = function(ar) {562 if (ss.isNullOrUndefined(ar)) {563 return 0;564 }565 return parseFloat(ss.replaceAllString(ar, 'px', ''));566 };567 $global_domUtils.px = function(ar) {568 return ar + 'px';569 };570 $global_domUtils.transformRotate = function(ar) {571 return ss.formatString('rotate({0}deg)', ar);572 };573 $global_domUtils.noTransformRotate = function(ar) {574 return parseFloat(ss.replaceAllString(ss.replaceAllString(ar, 'rotate(', ''), 'deg)', ''));575 //todo regex??576 };577 ////////////////////////////////////////////////////////////////////////////////578 // global.CardGameAppearanceEffect579 var $global_Effect = function(type) {580 this.type = 0;581 this.drawTime = 0;582 this.chainedEffect = null;583 this.type = type;584 this.drawTime = 0;585 };586 $global_Effect.prototype = {587 chainEffect: function(ef) {588 this.chainedEffect = ef;589 return ef;590 },591 build: function(m) {592 },593 tearDown: function(m) {594 },595 build$1: function(m) {596 },597 tearDown$1: function(em) {598 }599 };600 $global_Effect.fromJson = function(effect) {601 var ef;602 switch (effect.type) {603 case 0: {604 var $t1 = $global_CardGameEffectHighlightOptions.$ctor();605 $t1.color = ss.cast(effect.color, String);606 $t1.offsetX = ss.Nullable.unbox(ss.cast(ss.coalesce(effect.offsetX, 0), Number));607 $t1.offsetY = ss.Nullable.unbox(ss.cast(ss.coalesce(effect.offsetY, 0), Number));608 $t1.radius = ss.Nullable.unbox(ss.cast(ss.coalesce(effect.radius, 0), Number));609 $t1.rotate = ss.Nullable.unbox(ss.cast(ss.coalesce(effect.rotate, 0), Number));610 ef = new $global_Effect$Highlight($t1);611 break;612 }613 case 1: {614 var $t2 = $global_CardGameEffectRotateOptions.$ctor();615 $t2.degrees = ss.Nullable.unbox(ss.cast(ss.coalesce(effect.degrees, 0), Number));616 ef = new $global_Effect$Rotate($t2);617 break;618 }619 case 2: {620 var $t3 = $global_CardGameEffectBendOptions.$ctor();621 $t3.degrees = ss.Nullable.unbox(ss.cast(ss.coalesce(effect.degrees, 0), Number));622 ef = new $global_Effect$Bend($t3);623 break;624 }625 case 3: {626 ef = new $global_Effect$StyleProperty(new $global_AppearanceStyle());627 var jm = ef;628 eval('jm.style=effect.style');629 break;630 }631 case 4: {632 ef = null;633 break;634 }635 default: {636 ef = null;637 break;638 }639 }640 if (ss.isValue(ef.chainedEffect)) {641 ef.chainedEffect = $global_Effect.fromJson(effect.chainedEffect);642 }643 return ef;644 };645 ////////////////////////////////////////////////////////////////////////////////646 // global.CardGameAppearanceEffectBend647 var $global_Effect$Bend = function(options) {648 this.degrees = 0;649 $global_Effect.call(this, 2);650 this.degrees = ((options.degrees === 0) ? 0 : options.degrees);651 this.drawTime = 1;652 };653 ////////////////////////////////////////////////////////////////////////////////654 // global.CardGameAppearanceEffectHighlight655 var $global_Effect$Highlight = function(options) {656 this.radius = 0;657 this.color = null;658 this.rotate = 0;659 this.offsetX = 0;660 this.offsetY = 0;661 this.opacity = 0;662 $global_Effect.call(this, 0);663 this.radius = ((options.radius === 0) ? 0 : options.radius);664 this.color = (ss.isNullOrUndefined(options.color) ? 'yellow' : options.color);665 this.rotate = ((options.rotate === 0) ? 0 : options.rotate);666 this.opacity = ((options.opacity === 0) ? 0 : options.opacity);667 this.offsetX = ((options.offsetX === 0) ? 0 : options.offsetX);668 this.offsetY = ((options.offsetY === 0) ? 0 : options.offsetY);669 this.drawTime = 0;670 };671 $global_Effect$Highlight.prototype = {672 build: function(e) {673 var em = e.outerElementStyle;674 em.set_padding(ss.formatString('{0} {0} {0} {0}', $global_domUtils.px(this.radius)));675 em.set_backgroundColor(this.color);676 em.set_border('solid 2px black');677 em.set_left($global_domUtils.px($global_domUtils.nopx(em.get_left()) - this.radius));678 em.set_top($global_domUtils.px($global_domUtils.nopx(em.get_top()) - this.radius));679 em.set_borderRadius($global_domUtils.px(15));680 em.set_boxShadow('4px 4px 2px #333');681 },682 build$1: function(e) {683 var cur = new $global_InternalStyle();684 cur.addChild(e.outerElementStyle);685 e.outerElementStyle = cur;686 var em = e.outerElementStyle;687 em.set_padding(ss.formatString('{0} {0} {0} {0}', $global_domUtils.px(this.radius)));688 em.set_backgroundColor(this.color);689 em.set_border('solid 2px black');690 em.set_left($global_domUtils.px($global_domUtils.nopx(em.get_left()) - this.radius));691 em.set_top($global_domUtils.px($global_domUtils.nopx(em.get_top()) - this.radius));692 em.set_borderRadius($global_domUtils.px(15));693 em.set_boxShadow('4px 4px 2px #333');694 },695 tearDown: function(e) {696 //697 // var em = e.OuterElementStyle;698 //699 // 700 //701 // /// Window.Alert("good2");702 //703 // 704 //705 // double paddingRadiusL = em.PaddingLeft.nopx();706 //707 // double paddingRadiusT = em.PaddingTop.nopx();708 //709 // em.Left = ( em.Left.nopx() - em.PaddingLeft.nopx() ).px();710 //711 // em.Top = ( em.Top.nopx() - em.PaddingTop.nopx() ).px();712 //713 // 714 //715 // for (int i = 0; i < e.OuterElement.ChildNodes.Length; i++) {716 //717 // var childNode = e.OuterElement.ChildNodes[i];718 //719 // 720 //721 // if (childNode.TagName == "DIV") {722 //723 // childNode.Style.Left = ( childNode.Style.Left.nopx() + paddingRadiusL ).px();724 //725 // childNode.Style.Top = ( childNode.Style.Top.nopx() + paddingRadiusT ).px();726 //727 // }728 //729 // }730 },731 tearDown$1: function(e) {732 //733 // var em = e.OuterElementStyle;734 //735 // 736 //737 // /// Window.Alert("good2");738 //739 // 740 //741 // double paddingRadiusL = em.PaddingLeft.nopx();742 //743 // double paddingRadiusT = em.PaddingTop.nopx();744 //745 // em.Left = ( em.Left.nopx() - em.PaddingLeft.nopx() ).px();746 //747 // em.Top = ( em.Top.nopx() - em.PaddingTop.nopx() ).px();748 //749 // 750 //751 // for (int i = 0; i < e.OuterElement.ChildNodes.Length; i++) {752 //753 // var childNode = e.OuterElement.ChildNodes[i];754 //755 // if (childNode.TagName == "DIV") {756 //757 // childNode.Style.Left = (childNode.Style.Left.nopx() + paddingRadiusL).px();758 //759 // childNode.Style.Top = (childNode.Style.Top.nopx() + paddingRadiusT).px();760 //761 // }762 //763 // }764 }765 };766 ////////////////////////////////////////////////////////////////////////////////767 // global.CardGameAppearanceEffectRotate768 var $global_Effect$Rotate = function(options) {769 this.degrees = 0;770 $global_Effect.call(this, 1);771 this.degrees = ((options.degrees === 0) ? 0 : options.degrees);772 this.drawTime = 1;773 };774 ////////////////////////////////////////////////////////////////////////////////775 // global.CardGameAppearanceEffectStyleProperty776 var $global_Effect$StyleProperty = function(style) {777 this.style = null;778 $global_Effect.call(this, 3);779 this.style = style;780 };781 $global_Effect$StyleProperty.prototype = {782 build: function(m) {783 if (ss.isNullOrUndefined(this.style)) {784 return;785 }786 m.outerElementStyle.set_backgroundColor(this.style.outerStyle.backColor);787 if (ss.isValue(this.style.outerStyle.border)) {788 if (ss.isValue(this.style.outerStyle.border.left)) {789 m.outerElementStyle.set_borderLeftColor(this.style.outerStyle.border.left.color);790 m.outerElementStyle.set_borderLeftStyle(this.style.outerStyle.border.left.style.toString());791 m.outerElementStyle.set_borderLeftWidth(this.style.outerStyle.border.left.width);792 }793 if (ss.isValue(this.style.outerStyle.border.top)) {794 m.outerElementStyle.set_borderTopColor(this.style.outerStyle.border.top.color);795 m.outerElementStyle.set_borderTopStyle(this.style.outerStyle.border.top.style.toString());796 m.outerElementStyle.set_borderTopWidth(this.style.outerStyle.border.top.width);797 }798 if (ss.isValue(this.style.outerStyle.border.right)) {799 m.outerElementStyle.set_borderRightColor(this.style.outerStyle.border.right.color);800 m.outerElementStyle.set_borderRightStyle(this.style.outerStyle.border.right.style.toString());801 m.outerElementStyle.set_borderRightWidth(this.style.outerStyle.border.right.width);802 }803 if (ss.isValue(this.style.outerStyle.border.bottom)) {804 m.outerElementStyle.set_borderBottomColor(this.style.outerStyle.border.bottom.color);805 m.outerElementStyle.set_borderBottomStyle(this.style.outerStyle.border.bottom.style.toString());806 m.outerElementStyle.set_borderBottomWidth(this.style.outerStyle.border.bottom.width);807 }808 }809 },810 tearDown: function(m) {811 $global_Effect.prototype.tearDown.call(this, m);812 },813 build$1: function(m) {814 if (ss.isNullOrUndefined(this.style)) {815 return;816 }817 m.outerElementStyle.set_backgroundColor(this.style.outerStyle.backColor);818 },819 tearDown$1: function(em) {820 $global_Effect.prototype.tearDown$1.call(this, em);821 }822 };823 ////////////////////////////////////////////////////////////////////////////////824 // global.EffectType825 var $global_EffectType = function() {826 };827 $global_EffectType.prototype = { highlight: 0, rotate: 1, bend: 2, styleProperty: 3, animated: 4 };828 ss.registerEnum(global, 'global.EffectType', $global_EffectType, false);829 ////////////////////////////////////////////////////////////////////////////////830 // global.FiberYieldResponse831 var $global_FiberYieldResponse = function(type) {832 this.variableLookup = null;833 this.type = 0;834 this.contents = null;835 this.question = null;836 this.lineNumber = 0;837 this.value = null;838 this.type = type;839 };840 $global_FiberYieldResponse.$ctor2 = function(type, question) {841 this.variableLookup = null;842 this.type = 0;843 this.contents = null;844 this.question = null;845 this.lineNumber = 0;846 this.value = null;847 this.type = type;848 this.question = question;849 };850 $global_FiberYieldResponse.$ctor1 = function(type, contents) {851 this.variableLookup = null;852 this.type = 0;853 this.contents = null;854 this.question = null;855 this.lineNumber = 0;856 this.value = null;857 this.type = type;858 this.contents = contents;859 };860 $global_FiberYieldResponse.$ctor3 = function(type, lineNumber, value) {861 this.variableLookup = null;862 this.type = 0;863 this.contents = null;864 this.question = null;865 this.lineNumber = 0;866 this.value = null;867 this.type = type;868 this.lineNumber = lineNumber;869 this.value = value;870 };871 $global_FiberYieldResponse.$ctor2.prototype = $global_FiberYieldResponse.$ctor1.prototype = $global_FiberYieldResponse.$ctor3.prototype = $global_FiberYieldResponse.prototype;872 ////////////////////////////////////////////////////////////////////////////////873 // global.FiberYieldResponseType874 var $global_FiberYieldResponseType = function() {875 };876 $global_FiberYieldResponseType.prototype = { askQuestion: 0, log: 1, gameOver: 2, break$1: 3, variableLookup: 4, playersLeft: 5 };877 ss.registerEnum(global, 'global.FiberYieldResponseType', $global_FiberYieldResponseType, false);878 ////////////////////////////////////////////////////////////////////////////////879 // global.GameCardGameOptions880 var $global_GameCardGameOptions = function() {881 };882 $global_GameCardGameOptions.createInstance = function() {883 return $global_GameCardGameOptions.$ctor();884 };885 $global_GameCardGameOptions.$ctor = function() {886 var $this = {};887 $this.numberOfCards = 0;888 $this.numberOfJokers = 0;889 $this.size = null;890 return $this;891 };892 ////////////////////////////////////////////////////////////////////////////////893 // global.GameCardGameTextAreaOptions894 var $global_GameCardGameTextAreaOptions = function() {895 };896 $global_GameCardGameTextAreaOptions.createInstance = function() {897 return $global_GameCardGameTextAreaOptions.$ctor();898 };899 $global_GameCardGameTextAreaOptions.$ctor = function() {900 var $this = {};901 $this.name = null;902 $this.x = 0;903 $this.y = 0;904 $this.text = null;905 return $this;906 };907 ////////////////////////////////////////////////////////////////////////////////908 // global.InternalStyle909 var $global_InternalStyle = function() {910 this.$keys = {};911 this.$lastStyle = null;912 this.$myAccelerator = false;913 this.$myBackground = null;914 this.$myBackgroundAttachment = null;915 this.$myBackgroundColor = null;916 this.$myBackgroundImage = null;917 this.$myBackgroundPosition = null;918 this.$myBackgroundPositionX = null;919 this.$myBackgroundPositionY = null;920 this.$myBackgroundRepeat = null;921 this.$myBorder = null;922 this.$myBorderBottom = null;923 this.$myBorderBottomColor = null;924 this.$myBorderBottomStyle = null;925 this.$myBorderBottomWidth = null;926 this.$myBorderCollapse = null;927 this.$myBorderColor = null;928 this.$myBorderLeft = null;929 this.$myBorderLeftColor = null;930 this.$myBorderLeftStyle = null;931 this.$myBorderLeftWidth = null;932 this.$myBorderRadius = null;933 this.$myBorderRight = null;934 this.$myBorderRightColor = null;935 this.$myBorderRightStyle = null;936 this.$myBorderRightWidth = null;937 this.$myBorderStyle = null;938 this.$myBorderTop = null;939 this.$myBorderTopColor = null;940 this.$myBorderTopStyle = null;941 this.$myBorderTopWidth = null;942 this.$myBorderWidth = null;943 this.$myBottom = null;944 this.$myBoxShadow = null;945 this.$myClear = null;946 this.$myClip = null;947 this.$myColor = null;948 this.$myCssFloat = null;949 this.$myCssText = null;950 this.$myCursor = null;951 this.$myDirection = null;952 this.$myDisplay = null;953 this.$myFilter = null;954 this.$myFont = null;955 this.$myFontFamily = null;956 this.$myFontSize = null;957 this.$myFontStyle = null;958 this.$myFontVariant = null;959 this.$myFontWeight = null;960 this.$myHeight = null;961 this.$myLeft = null;962 this.$myLetterSpacing = null;963 this.$myLineHeight = null;964 this.$myListStyle = null;965 this.$myListStyleImage = null;966 this.$myListStylePosition = null;967 this.$myListStyleType = null;968 this.$myMargin = null;969 this.$myMarginBottom = null;970 this.$myMarginLeft = null;971 this.$myMarginRight = null;972 this.$myMarginTop = null;973 this.$myMaxHeight = null;974 this.$myMaxWidth = null;975 this.$myMinHeight = null;976 this.$myMinWidth = null;977 this.$myMsInterpolationMode = null;978 this.$myOpacity = null;979 this.$myOverflow = null;980 this.$myOverflowX = null;981 this.$myOverflowY = null;982 this.$myPadding = null;983 this.$myPaddingBottom = null;984 this.$myPaddingLeft = null;985 this.$myPaddingRight = null;986 this.$myPaddingTop = null;987 this.$myPageBreakAfter = null;988 this.$myPageBreakBefore = null;989 this.$myPixelBottom = 0;990 this.$myPixelHeight = 0;991 this.$myPixelLeft = 0;992 this.$myPixelRight = 0;993 this.$myPixelTop = 0;994 this.$myPixelWidth = 0;995 this.$myPosBottom = 0;996 this.$myPosHeight = 0;997 this.$myPosLeft = 0;998 this.$myPosRight = 0;999 this.$myPosTop = 0;1000 this.$myPosWidth = 0;1001 this.$myPosition = null;1002 this.$myRight = null;1003 this.$myStyleFloat = null;1004 this.$myTableLayout = null;1005 this.$myTextAlign = null;1006 this.$myTextDecoration = null;1007 this.$myTextDecorationBlink = null;1008 this.$myTextDecorationLineThrough = null;1009 this.$myTextDecorationNone = null;1010 this.$myTextDecorationOverline = null;1011 this.$myTextDecorationUnderline = null;1012 this.$myTextIndent = null;1013 this.$myTextJustify = null;1014 this.$myTextOverflow = null;1015 this.$myTextTransform = null;1016 this.$myTop = null;1017 this.$myTransform = null;1018 this.$myVerticalAlign = null;1019 this.$myVisibility = null;1020 this.$myWhiteSpace = null;1021 this.$myWidth = null;1022 this.$myWordSpacing = null;1023 this.$myWordWrap = null;1024 this.$myWritingMode = null;1025 this.$myZIndex = 0;1026 this.$myZoom = null;1027 this.parent = null;1028 this.children = null;1029 this.children = [];1030 this.$lastStyle = new $global_InternalStyle.$ctor1(null);1031 };1032 $global_InternalStyle.prototype = {1033 get_accelerator: function() {1034 return this.$myAccelerator;1035 },1036 set_accelerator: function(value) {1037 this.$myAccelerator = value;1038 this.$setValue('accelerator', value);1039 },1040 get_background: function() {1041 return this.$myBackground;1042 },1043 set_background: function(value) {1044 this.$myBackground = value;1045 this.$setValue('background', value);1046 },1047 get_backgroundAttachment: function() {1048 return this.$myBackgroundAttachment;1049 },1050 set_backgroundAttachment: function(value) {1051 this.$myBackgroundAttachment = value;1052 this.$setValue('background-attachment', value);1053 },1054 get_boxShadow: function() {1055 return this.$myBoxShadow;1056 },1057 set_boxShadow: function(value) {1058 this.$myBoxShadow = value;1059 this.$setValue('box-shadow', value);1060 },1061 get_borderRadius: function() {1062 return this.$myBorderRadius;1063 },1064 set_borderRadius: function(value) {1065 this.$myBorderRadius = value;1066 this.$setValue('border-radius', value);1067 },1068 get_transform: function() {1069 return this.$myTransform;1070 },1071 set_transform: function(value) {1072 this.$myTransform = value;1073 this.$setValue('transform', value);1074 },1075 get_backgroundColor: function() {1076 return this.$myBackgroundColor;1077 },1078 set_backgroundColor: function(value) {1079 this.$myBackgroundColor = value;1080 this.$setValue('background-color', value);1081 },1082 get_backgroundImage: function() {1083 return this.$myBackgroundImage;1084 },1085 set_backgroundImage: function(value) {1086 this.$myBackgroundImage = value;1087 this.$setValue('background-image', value);1088 },1089 get_backgroundPosition: function() {1090 return this.$myBackgroundPosition;1091 },1092 set_backgroundPosition: function(value) {1093 this.$myBackgroundPosition = value;1094 this.$setValue('background-position', value);1095 },1096 get_backgroundPositionX: function() {1097 return this.$myBackgroundPositionX;1098 },1099 set_backgroundPositionX: function(value) {1100 this.$myBackgroundPositionX = value;1101 this.$setValue('background-position-x', value);1102 },1103 get_backgroundPositionY: function() {1104 return this.$myBackgroundPositionY;1105 },1106 set_backgroundPositionY: function(value) {1107 this.$myBackgroundPositionY = value;1108 this.$setValue('background-position-y', value);1109 },1110 get_backgroundRepeat: function() {1111 return this.$myBackgroundRepeat;1112 },1113 set_backgroundRepeat: function(value) {1114 this.$myBackgroundRepeat = value;1115 this.$setValue('background-repeat', value);1116 },1117 get_border: function() {1118 return this.$myBorder;1119 },1120 set_border: function(value) {1121 this.$myBorder = value;1122 this.$setValue('border', value);1123 },1124 get_borderBottom: function() {1125 return this.$myBorderBottom;1126 },1127 set_borderBottom: function(value) {1128 this.$myBorderBottom = value;1129 this.$setValue('border-bottom', value);1130 },1131 get_borderBottomColor: function() {1132 return this.$myBorderBottomColor;1133 },1134 set_borderBottomColor: function(value) {1135 this.$myBorderBottomColor = value;1136 this.$setValue('border-bottom-color', value);1137 },1138 get_borderBottomStyle: function() {1139 return this.$myBorderBottomStyle;1140 },1141 set_borderBottomStyle: function(value) {1142 this.$myBorderBottomStyle = value;1143 this.$setValue('border-bottom-style', value);1144 },1145 get_borderBottomWidth: function() {1146 return this.$myBorderBottomWidth;1147 },1148 set_borderBottomWidth: function(value) {1149 this.$myBorderBottomWidth = value;1150 this.$setValue('border-bottom-width', value);1151 },1152 get_borderCollapse: function() {1153 return this.$myBorderCollapse;1154 },1155 set_borderCollapse: function(value) {1156 this.$myBorderCollapse = value;1157 this.$setValue('border-collapse', value);1158 },1159 get_borderColor: function() {1160 return this.$myBorderColor;1161 },1162 set_borderColor: function(value) {1163 this.$myBorderColor = value;1164 this.$setValue('border-color', value);1165 },1166 get_borderLeft: function() {1167 return this.$myBorderLeft;1168 },1169 set_borderLeft: function(value) {1170 this.$myBorderLeft = value;1171 this.$setValue('border-left', value);1172 },1173 get_borderLeftColor: function() {1174 return this.$myBorderLeftColor;1175 },1176 set_borderLeftColor: function(value) {1177 this.$myBorderLeftColor = value;1178 this.$setValue('border-left-color', value);1179 },1180 get_borderLeftStyle: function() {1181 return this.$myBorderLeftStyle;1182 },1183 set_borderLeftStyle: function(value) {1184 this.$myBorderLeftStyle = value;1185 this.$setValue('border-left-style', value);1186 },1187 get_borderLeftWidth: function() {1188 return this.$myBorderLeftWidth;1189 },1190 set_borderLeftWidth: function(value) {1191 this.$myBorderLeftWidth = value;1192 this.$setValue('border-left-width', value);1193 },1194 get_borderRight: function() {1195 return this.$myBorderRight;1196 },1197 set_borderRight: function(value) {1198 this.$myBorderRight = value;1199 this.$setValue('border-right', value);1200 },1201 get_borderRightColor: function() {1202 return this.$myBorderRightColor;1203 },1204 set_borderRightColor: function(value) {1205 this.$myBorderRightColor = value;1206 this.$setValue('border-right-color', value);1207 },1208 get_borderRightStyle: function() {1209 return this.$myBorderRightStyle;1210 },1211 set_borderRightStyle: function(value) {1212 this.$myBorderRightStyle = value;1213 this.$setValue('border-right-style', value);1214 },1215 get_borderRightWidth: function() {1216 return this.$myBorderRightWidth;1217 },1218 set_borderRightWidth: function(value) {1219 this.$myBorderRightWidth = value;1220 this.$setValue('border-right-width', value);1221 },1222 get_borderStyle: function() {1223 return this.$myBorderStyle;1224 },1225 set_borderStyle: function(value) {1226 this.$myBorderStyle = value;1227 this.$setValue('border-style', value);1228 },1229 get_borderTop: function() {1230 return this.$myBorderTop;1231 },1232 set_borderTop: function(value) {1233 this.$myBorderTop = value;1234 this.$setValue('border-top', value);1235 },1236 get_borderTopColor: function() {1237 return this.$myBorderTopColor;1238 },1239 set_borderTopColor: function(value) {1240 this.$myBorderTopColor = value;1241 this.$setValue('border-top-color', value);1242 },1243 get_borderTopStyle: function() {1244 return this.$myBorderTopStyle;1245 },1246 set_borderTopStyle: function(value) {1247 this.$myBorderTopStyle = value;1248 this.$setValue('border-top-style', value);1249 },1250 get_borderTopWidth: function() {1251 return this.$myBorderTopWidth;1252 },1253 set_borderTopWidth: function(value) {1254 this.$myBorderTopWidth = value;1255 this.$setValue('border-top-width', value);1256 },1257 get_borderWidth: function() {1258 return this.$myBorderWidth;1259 },1260 set_borderWidth: function(value) {1261 this.$myBorderWidth = value;1262 this.$setValue('border-width', value);1263 },1264 get_bottom: function() {1265 return this.$myBottom;1266 },1267 set_bottom: function(value) {1268 this.$myBottom = value;1269 this.$setValue('bottom', value);1270 },1271 get_clear: function() {1272 return this.$myClear;1273 },1274 set_clear: function(value) {1275 this.$myClear = value;1276 this.$setValue('clear', value);1277 },1278 get_clip: function() {1279 return this.$myClip;1280 },1281 set_clip: function(value) {1282 this.$myClip = value;1283 this.$setValue('clip', value);1284 },1285 get_color: function() {1286 return this.$myColor;1287 },1288 set_color: function(value) {1289 this.$myColor = value;1290 this.$setValue('color', value);1291 },1292 get_cssFloat: function() {1293 return this.$myCssFloat;1294 },1295 set_cssFloat: function(value) {1296 this.$myCssFloat = value;1297 this.$setValue('css-float', value);1298 },1299 get_cssText: function() {1300 return this.$myCssText;1301 },1302 set_cssText: function(value) {1303 this.$myCssText = value;1304 this.$setValue('css-text', value);1305 },1306 get_cursor: function() {1307 return this.$myCursor;1308 },1309 set_cursor: function(value) {1310 this.$myCursor = value;1311 this.$setValue('cursor', value);1312 },1313 get_direction: function() {1314 return this.$myDirection;1315 },1316 set_direction: function(value) {1317 this.$myDirection = value;1318 this.$setValue('direction', value);1319 },1320 get_display: function() {1321 return this.$myDisplay;1322 },1323 set_display: function(value) {1324 this.$myDisplay = value;1325 this.$setValue('display', value);1326 },1327 get_filter: function() {1328 return this.$myFilter;1329 },1330 set_filter: function(value) {1331 this.$myFilter = value;1332 this.$setValue('filter', value);1333 },1334 get_font: function() {1335 return this.$myFont;1336 },1337 set_font: function(value) {1338 this.$myFont = value;1339 this.$setValue('font', value);1340 },1341 get_fontFamily: function() {1342 return this.$myFontFamily;1343 },1344 set_fontFamily: function(value) {1345 this.$myFontFamily = value;1346 this.$setValue('font-family', value);1347 },1348 get_fontSize: function() {1349 return this.$myFontSize;1350 },1351 set_fontSize: function(value) {1352 this.$myFontSize = value;1353 this.$setValue('font-size', value);1354 },1355 get_fontStyle: function() {1356 return this.$myFontStyle;1357 },1358 set_fontStyle: function(value) {1359 this.$myFontStyle = value;1360 this.$setValue('font-style', value);1361 },1362 get_fontVariant: function() {1363 return this.$myFontVariant;1364 },1365 set_fontVariant: function(value) {1366 this.$myFontVariant = value;1367 this.$setValue('font-variant', value);1368 },1369 get_fontWeight: function() {1370 return this.$myFontWeight;1371 },1372 set_fontWeight: function(value) {1373 this.$myFontWeight = value;1374 this.$setValue('font-weight', value);1375 },1376 get_height: function() {1377 return this.$myHeight;1378 },1379 set_height: function(value) {1380 this.$myHeight = value;1381 this.$setValue('height', value);1382 },1383 get_left: function() {1384 return this.$myLeft;1385 },1386 set_left: function(value) {1387 this.$myLeft = value;1388 this.$setValue('left', value);1389 },1390 get_letterSpacing: function() {1391 return this.$myLetterSpacing;1392 },1393 set_letterSpacing: function(value) {1394 this.$myLetterSpacing = value;1395 this.$setValue('letter-spacing', value);1396 },1397 get_lineHeight: function() {1398 return this.$myLineHeight;1399 },1400 set_lineHeight: function(value) {1401 this.$myLineHeight = value;1402 this.$setValue('line-height', value);1403 },1404 get_listStyle: function() {1405 return this.$myListStyle;1406 },1407 set_listStyle: function(value) {1408 this.$myListStyle = value;1409 this.$setValue('list-style', value);1410 },1411 get_listStyleImage: function() {1412 return this.$myListStyleImage;1413 },1414 set_listStyleImage: function(value) {1415 this.$myListStyleImage = value;1416 this.$setValue('list-style-image', value);1417 },1418 get_listStylePosition: function() {1419 return this.$myListStylePosition;1420 },1421 set_listStylePosition: function(value) {1422 this.$myListStylePosition = value;1423 this.$setValue('list-style-position', value);1424 },1425 get_listStyleType: function() {1426 return this.$myListStyleType;1427 },1428 set_listStyleType: function(value) {1429 this.$myListStyleType = value;1430 this.$setValue('list-style-type', value);1431 },1432 get_margin: function() {1433 return this.$myMargin;1434 },1435 set_margin: function(value) {1436 this.$myMargin = value;1437 this.$setValue('margin', value);1438 },1439 get_marginBottom: function() {1440 return this.$myMarginBottom;1441 },1442 set_marginBottom: function(value) {1443 this.$myMarginBottom = value;1444 this.$setValue('margin-bottom', value);1445 },1446 get_marginLeft: function() {1447 return this.$myMarginLeft;1448 },1449 set_marginLeft: function(value) {1450 this.$myMarginLeft = value;1451 this.$setValue('margin-left', value);1452 },1453 get_marginRight: function() {1454 return this.$myMarginRight;1455 },1456 set_marginRight: function(value) {1457 this.$myMarginRight = value;1458 this.$setValue('margin-right', value);1459 },1460 get_marginTop: function() {1461 return this.$myMarginTop;1462 },1463 set_marginTop: function(value) {1464 this.$myMarginTop = value;1465 this.$setValue('margin-top', value);1466 },1467 get_maxHeight: function() {1468 return this.$myMaxHeight;1469 },1470 set_maxHeight: function(value) {1471 this.$myMaxHeight = value;1472 this.$setValue('max-height', value);1473 },1474 get_maxWidth: function() {1475 return this.$myMaxWidth;1476 },1477 set_maxWidth: function(value) {1478 this.$myMaxWidth = value;1479 this.$setValue('max-width', value);1480 },1481 get_minHeight: function() {1482 return this.$myMinHeight;1483 },1484 set_minHeight: function(value) {1485 this.$myMinHeight = value;1486 this.$setValue('min-height', value);1487 },1488 get_minWidth: function() {1489 return this.$myMinWidth;1490 },1491 set_minWidth: function(value) {1492 this.$myMinWidth = value;1493 this.$setValue('min-width', value);1494 },1495 get_msInterpolationMode: function() {1496 return this.$myMsInterpolationMode;1497 },1498 set_msInterpolationMode: function(value) {1499 this.$myMsInterpolationMode = value;1500 this.$setValue('ms-interpolation-mode', value);1501 },1502 get_opacity: function() {1503 return this.$myOpacity;1504 },1505 set_opacity: function(value) {1506 this.$myOpacity = value;1507 this.$setValue('opacity', value);1508 },1509 get_overflow: function() {1510 return this.$myOverflow;1511 },1512 set_overflow: function(value) {1513 this.$myOverflow = value;1514 this.$setValue('overflow', value);1515 },1516 get_overflowX: function() {1517 return this.$myOverflowX;1518 },1519 set_overflowX: function(value) {1520 this.$myOverflowX = value;1521 this.$setValue('overflow-x', value);1522 },1523 get_overflowY: function() {1524 return this.$myOverflowY;1525 },1526 set_overflowY: function(value) {1527 this.$myOverflowY = value;1528 this.$setValue('overflow-y', value);1529 },1530 get_padding: function() {1531 return this.$myPadding;1532 },1533 set_padding: function(value) {1534 this.$myPadding = value;1535 this.$setValue('padding', value);1536 },1537 get_paddingBottom: function() {1538 return this.$myPaddingBottom;1539 },1540 set_paddingBottom: function(value) {1541 this.$myPaddingBottom = value;1542 this.$setValue('padding-bottom', value);1543 },1544 get_paddingLeft: function() {1545 return this.$myPaddingLeft;1546 },1547 set_paddingLeft: function(value) {1548 this.$myPaddingLeft = value;1549 this.$setValue('padding-left', value);1550 },1551 get_paddingRight: function() {1552 return this.$myPaddingRight;1553 },1554 set_paddingRight: function(value) {1555 this.$myPaddingRight = value;1556 this.$setValue('padding-right', value);1557 },1558 get_paddingTop: function() {1559 return this.$myPaddingTop;1560 },1561 set_paddingTop: function(value) {1562 this.$myPaddingTop = value;1563 this.$setValue('padding-top', value);1564 },1565 get_pageBreakAfter: function() {1566 return this.$myPageBreakAfter;1567 },1568 set_pageBreakAfter: function(value) {1569 this.$myPageBreakAfter = value;1570 this.$setValue('page-break-after', value);1571 },1572 get_pageBreakBefore: function() {1573 return this.$myPageBreakBefore;1574 },1575 set_pageBreakBefore: function(value) {1576 this.$myPageBreakBefore = value;1577 this.$setValue('page-break-before', value);1578 },1579 get_pixelBottom: function() {1580 return this.$myPixelBottom;1581 },1582 set_pixelBottom: function(value) {1583 this.$myPixelBottom = value;1584 this.$setValue('pixel-bottom', value);1585 },1586 get_pixelHeight: function() {1587 return this.$myPixelHeight;1588 },1589 set_pixelHeight: function(value) {1590 this.$myPixelHeight = value;1591 this.$setValue('pixel-height', value);1592 },1593 get_pixelLeft: function() {1594 return this.$myPixelLeft;1595 },1596 set_pixelLeft: function(value) {1597 this.$myPixelLeft = value;1598 this.$setValue('pixel-left', value);1599 },1600 get_pixelRight: function() {1601 return this.$myPixelRight;1602 },1603 set_pixelRight: function(value) {1604 this.$myPixelRight = value;1605 this.$setValue('pixel-right', value);1606 },1607 get_pixelTop: function() {1608 return this.$myPixelTop;1609 },1610 set_pixelTop: function(value) {1611 this.$myPixelTop = value;1612 this.$setValue('pixel-top', value);1613 },1614 get_pixelWidth: function() {1615 return this.$myPixelWidth;1616 },1617 set_pixelWidth: function(value) {1618 this.$myPixelWidth = value;1619 this.$setValue('pixel-width', value);1620 },1621 get_posBottom: function() {1622 return this.$myPosBottom;1623 },1624 set_posBottom: function(value) {1625 this.$myPosBottom = value;1626 this.$setValue('pos-bottom', value);1627 },1628 get_posHeight: function() {1629 return this.$myPosHeight;1630 },1631 set_posHeight: function(value) {1632 this.$myPosHeight = value;1633 this.$setValue('pos-height', value);1634 },1635 get_position: function() {1636 return this.$myPosition;1637 },1638 set_position: function(value) {1639 this.$myPosition = value;1640 this.$setValue('position', value);1641 },1642 get_posLeft: function() {1643 return this.$myPosLeft;1644 },1645 set_posLeft: function(value) {1646 this.$myPosLeft = value;1647 this.$setValue('pos-left', value);1648 },1649 get_posRight: function() {1650 return this.$myPosRight;1651 },1652 set_posRight: function(value) {1653 this.$myPosRight = value;1654 this.$setValue('pos-pight', value);1655 },1656 get_posTop: function() {1657 return this.$myPosTop;1658 },1659 set_posTop: function(value) {1660 this.$myPosTop = value;1661 this.$setValue('pos-top', value);1662 },1663 get_posWidth: function() {1664 return this.$myPosWidth;1665 },1666 set_posWidth: function(value) {1667 this.$myPosWidth = value;1668 this.$setValue('pos-width', value);1669 },1670 get_right: function() {1671 return this.$myRight;1672 },1673 set_right: function(value) {1674 this.$myRight = value;1675 this.$setValue('right', value);1676 },1677 get_styleFloat: function() {1678 return this.$myStyleFloat;1679 },1680 set_styleFloat: function(value) {1681 this.$myStyleFloat = value;1682 this.$setValue('float', value);1683 },1684 get_tableLayout: function() {1685 return this.$myTableLayout;1686 },1687 set_tableLayout: function(value) {1688 this.$myTableLayout = value;1689 this.$setValue('table-layout', value);1690 },1691 get_textAlign: function() {1692 return this.$myTextAlign;1693 },1694 set_textAlign: function(value) {1695 this.$myTextAlign = value;1696 this.$setValue('text-align', value);1697 },1698 get_textDecoration: function() {1699 return this.$myTextDecoration;1700 },1701 set_textDecoration: function(value) {1702 this.$myTextDecoration = value;1703 this.$setValue('text-decoration', value);1704 },1705 get_textDecorationBlink: function() {1706 return this.$myTextDecorationBlink;1707 },1708 set_textDecorationBlink: function(value) {1709 this.$myTextDecorationBlink = value;1710 this.$setValue('text-decoration-blink', value);1711 },1712 get_textDecorationLineThrough: function() {1713 return this.$myTextDecorationLineThrough;1714 },1715 set_textDecorationLineThrough: function(value) {1716 this.$myTextDecorationLineThrough = value;1717 this.$setValue('text-decoration-line-through', value);1718 },1719 get_textDecorationNone: function() {1720 return this.$myTextDecorationNone;1721 },1722 set_textDecorationNone: function(value) {1723 this.$myTextDecorationNone = value;1724 this.$setValue('text-decoration-none', value);1725 },1726 get_textDecorationOverline: function() {1727 return this.$myTextDecorationOverline;1728 },1729 set_textDecorationOverline: function(value) {1730 this.$myTextDecorationOverline = value;1731 this.$setValue('text-decoration-overline', value);1732 },1733 get_textDecorationUnderline: function() {1734 return this.$myTextDecorationUnderline;1735 },1736 set_textDecorationUnderline: function(value) {1737 this.$myTextDecorationUnderline = value;1738 this.$setValue('text-decoration-underline', value);1739 },1740 get_textIndent: function() {1741 return this.$myTextIndent;1742 },1743 set_textIndent: function(value) {1744 this.$myTextIndent = value;1745 this.$setValue('text-indent', value);1746 },1747 get_textJustify: function() {1748 return this.$myTextJustify;1749 },1750 set_textJustify: function(value) {1751 this.$myTextJustify = value;1752 this.$setValue('text-justify', value);1753 },1754 get_textOverflow: function() {1755 return this.$myTextOverflow;1756 },1757 set_textOverflow: function(value) {1758 this.$myTextOverflow = value;1759 this.$setValue('textOverflow', value);1760 },1761 get_textTransform: function() {1762 return this.$myTextTransform;1763 },1764 set_textTransform: function(value) {1765 this.$myTextTransform = value;1766 this.$setValue('text-transform', value);1767 },1768 get_top: function() {1769 return this.$myTop;1770 },1771 set_top: function(value) {1772 this.$myTop = value;1773 this.$setValue('top', value);1774 },1775 get_verticalAlign: function() {1776 return this.$myVerticalAlign;1777 },1778 set_verticalAlign: function(value) {1779 this.$myVerticalAlign = value;1780 this.$setValue('vertical-align', value);1781 },1782 get_visibility: function() {1783 return this.$myVisibility;1784 },1785 set_visibility: function(value) {1786 this.$myVisibility = value;1787 this.$setValue('visibility', value);1788 },1789 get_whiteSpace: function() {1790 return this.$myWhiteSpace;1791 },1792 set_whiteSpace: function(value) {1793 this.$myWhiteSpace = value;1794 this.$setValue('white-space', value);1795 },1796 get_width: function() {1797 return this.$myWidth;1798 },1799 set_width: function(value) {1800 this.$myWidth = value;1801 this.$setValue('width', value);1802 },1803 get_wordSpacing: function() {1804 return this.$myWordSpacing;1805 },1806 set_wordSpacing: function(value) {1807 this.$myWordSpacing = value;1808 this.$setValue('word-spacing', value);1809 },1810 get_wordWrap: function() {1811 return this.$myWordWrap;1812 },1813 set_wordWrap: function(value) {1814 this.$myWordWrap = value;1815 this.$setValue('word-wrap', value);1816 },1817 get_writingMode: function() {1818 return this.$myWritingMode;1819 },1820 set_writingMode: function(value) {1821 this.$myWritingMode = value;1822 this.$setValue('writing-mode', value);1823 },1824 get_zIndex: function() {1825 return this.$myZIndex;1826 },1827 set_zIndex: function(value) {1828 this.$myZIndex = value;1829 this.$setValue('z-index', value);1830 },1831 get_zoom: function() {1832 return this.$myZoom;1833 },1834 set_zoom: function(value) {1835 this.$myZoom = value;1836 this.$setValue('zoom', value);1837 },1838 addChild: function(style) {1839 ss.add(this.children, style);1840 style.parent = this;1841 },1842 $setValue: function(name, v) {1843 this.$keys[name] = v;1844 },1845 setStyle: function(outerElement) {1846 var fm = this.$lastStyle.$keys;1847 var $t1 = new ss.ObjectEnumerator(fm);1848 try {1849 while ($t1.moveNext()) {1850 var item = $t1.current();1851 if (!ss.keyExists(this.$keys, item.key)) {1852 outerElement.style[item.key] = null;1853 }1854 }1855 }1856 finally {1857 $t1.dispose();1858 }1859 var $t2 = new ss.ObjectEnumerator(this.$keys);1860 try {1861 while ($t2.moveNext()) {1862 var key = $t2.current();1863 if (ss.keyExists(fm, key.key)) {1864 if (!ss.referenceEquals(fm[key.key], key.value)) {1865 outerElement.style[key.key] = (ss.isNullOrUndefined(key.value) ? null : key.value.toString());1866 }1867 }1868 else if (ss.isNullOrUndefined(key.value)) {1869 if (ss.isNullOrUndefined(outerElement.style[key.key])) {1870 outerElement.style[key.key] = null;1871 }1872 }1873 else {1874 outerElement.style[key.key] = key.value.toString();1875 }1876 }1877 }1878 finally {1879 $t2.dispose();1880 }1881 this.$lastStyle = new $global_InternalStyle.$ctor1(this);1882 }1883 };1884 $global_InternalStyle.$ctor1 = function(val) {1885 this.$keys = {};1886 this.$lastStyle = null;1887 this.$myAccelerator = false;1888 this.$myBackground = null;1889 this.$myBackgroundAttachment = null;1890 this.$myBackgroundColor = null;1891 this.$myBackgroundImage = null;1892 this.$myBackgroundPosition = null;1893 this.$myBackgroundPositionX = null;1894 this.$myBackgroundPositionY = null;1895 this.$myBackgroundRepeat = null;1896 this.$myBorder = null;1897 this.$myBorderBottom = null;1898 this.$myBorderBottomColor = null;1899 this.$myBorderBottomStyle = null;1900 this.$myBorderBottomWidth = null;1901 this.$myBorderCollapse = null;1902 this.$myBorderColor = null;1903 this.$myBorderLeft = null;1904 this.$myBorderLeftColor = null;1905 this.$myBorderLeftStyle = null;1906 this.$myBorderLeftWidth = null;1907 this.$myBorderRadius = null;1908 this.$myBorderRight = null;1909 this.$myBorderRightColor = null;1910 this.$myBorderRightStyle = null;1911 this.$myBorderRightWidth = null;1912 this.$myBorderStyle = null;1913 this.$myBorderTop = null;1914 this.$myBorderTopColor = null;1915 this.$myBorderTopStyle = null;1916 this.$myBorderTopWidth = null;1917 this.$myBorderWidth = null;1918 this.$myBottom = null;1919 this.$myBoxShadow = null;1920 this.$myClear = null;1921 this.$myClip = null;1922 this.$myColor = null;1923 this.$myCssFloat = null;1924 this.$myCssText = null;1925 this.$myCursor = null;1926 this.$myDirection = null;1927 this.$myDisplay = null;1928 this.$myFilter = null;1929 this.$myFont = null;1930 this.$myFontFamily = null;1931 this.$myFontSize = null;1932 this.$myFontStyle = null;1933 this.$myFontVariant = null;1934 this.$myFontWeight = null;1935 this.$myHeight = null;1936 this.$myLeft = null;1937 this.$myLetterSpacing = null;1938 this.$myLineHeight = null;1939 this.$myListStyle = null;1940 this.$myListStyleImage = null;1941 this.$myListStylePosition = null;1942 this.$myListStyleType = null;1943 this.$myMargin = null;1944 this.$myMarginBottom = null;1945 this.$myMarginLeft = null;1946 this.$myMarginRight = null;1947 this.$myMarginTop = null;1948 this.$myMaxHeight = null;1949 this.$myMaxWidth = null;1950 this.$myMinHeight = null;1951 this.$myMinWidth = null;1952 this.$myMsInterpolationMode = null;1953 this.$myOpacity = null;1954 this.$myOverflow = null;1955 this.$myOverflowX = null;1956 this.$myOverflowY = null;1957 this.$myPadding = null;1958 this.$myPaddingBottom = null;1959 this.$myPaddingLeft = null;1960 this.$myPaddingRight = null;1961 this.$myPaddingTop = null;1962 this.$myPageBreakAfter = null;1963 this.$myPageBreakBefore = null;1964 this.$myPixelBottom = 0;1965 this.$myPixelHeight = 0;1966 this.$myPixelLeft = 0;1967 this.$myPixelRight = 0;1968 this.$myPixelTop = 0;1969 this.$myPixelWidth = 0;1970 this.$myPosBottom = 0;1971 this.$myPosHeight = 0;1972 this.$myPosLeft = 0;1973 this.$myPosRight = 0;1974 this.$myPosTop = 0;1975 this.$myPosWidth = 0;1976 this.$myPosition = null;1977 this.$myRight = null;1978 this.$myStyleFloat = null;1979 this.$myTableLayout = null;1980 this.$myTextAlign = null;1981 this.$myTextDecoration = null;1982 this.$myTextDecorationBlink = null;1983 this.$myTextDecorationLineThrough = null;1984 this.$myTextDecorationNone = null;1985 this.$myTextDecorationOverline = null;1986 this.$myTextDecorationUnderline = null;1987 this.$myTextIndent = null;1988 this.$myTextJustify = null;1989 this.$myTextOverflow = null;1990 this.$myTextTransform = null;1991 this.$myTop = null;1992 this.$myTransform = null;1993 this.$myVerticalAlign = null;1994 this.$myVisibility = null;1995 this.$myWhiteSpace = null;1996 this.$myWidth = null;1997 this.$myWordSpacing = null;1998 this.$myWordWrap = null;1999 this.$myWritingMode = null;2000 this.$myZIndex = 0;2001 this.$myZoom = null;2002 this.parent = null;2003 this.children = null;2004 this.children = [];2005 if (ss.isNullOrUndefined(val)) {2006 return;2007 }2008 this.$myAccelerator = val.get_accelerator();2009 this.$myBackground = val.get_background();2010 this.$myBackgroundAttachment = val.get_backgroundAttachment();2011 this.$myBoxShadow = val.get_boxShadow();2012 this.$myBorderRadius = val.get_borderRadius();2013 this.$myTransform = val.get_transform();2014 this.$myBackgroundColor = val.get_backgroundColor();2015 this.$myBackgroundImage = val.get_backgroundImage();2016 this.$myBackgroundPosition = val.get_backgroundPosition();2017 this.$myBackgroundPositionX = val.get_backgroundPositionX();2018 this.$myBackgroundPositionY = val.get_backgroundPositionY();2019 this.$myBackgroundRepeat = val.get_backgroundRepeat();2020 this.$myBorder = val.get_border();2021 this.$myBorderBottom = val.get_borderBottom();2022 this.$myBorderBottomColor = val.get_borderBottomColor();2023 this.$myBorderBottomStyle = val.get_borderBottomStyle();2024 this.$myBorderBottomWidth = val.get_borderBottomWidth();2025 this.$myBorderCollapse = val.get_borderCollapse();2026 this.$myBorderColor = val.get_borderColor();2027 this.$myBorderLeft = val.get_borderLeft();2028 this.$myBorderLeftColor = val.get_borderLeftColor();2029 this.$myBorderLeftStyle = val.get_borderLeftStyle();2030 this.$myBorderLeftWidth = val.get_borderLeftWidth();2031 this.$myBorderRight = val.get_borderRight();2032 this.$myBorderRightColor = val.get_borderRightColor();2033 this.$myBorderRightStyle = val.get_borderRightStyle();2034 this.$myBorderRightWidth = val.get_borderRightWidth();2035 this.$myBorderStyle = val.get_borderStyle();2036 this.$myBorderTop = val.get_borderTop();2037 this.$myBorderTopColor = val.get_borderTopColor();2038 this.$myBorderTopStyle = val.get_borderTopStyle();2039 this.$myBorderTopWidth = val.get_borderTopWidth();2040 this.$myBorderWidth = val.get_borderWidth();2041 this.$myBottom = val.get_bottom();2042 this.$myClear = val.get_clear();2043 this.$myClip = val.get_clip();2044 this.$myColor = val.get_color();2045 this.$myCssFloat = val.get_cssFloat();2046 this.$myCssText = val.get_cssText();2047 this.$myCursor = val.get_cursor();2048 this.$myDirection = val.get_direction();2049 this.$myDisplay = val.get_display();2050 this.$myFilter = val.get_filter();2051 this.$myFont = val.get_font();2052 this.$myFontFamily = val.get_fontFamily();2053 this.$myFontSize = val.get_fontSize();2054 this.$myFontStyle = val.get_fontStyle();2055 this.$myFontVariant = val.get_fontVariant();2056 this.$myFontWeight = val.get_fontWeight();2057 this.$myHeight = val.get_height();2058 this.$myLeft = val.get_left();2059 this.$myLetterSpacing = val.get_letterSpacing();2060 this.$myLineHeight = val.get_lineHeight();2061 this.$myListStyle = val.get_listStyle();2062 this.$myListStyleImage = val.get_listStyleImage();2063 this.$myListStylePosition = val.get_listStylePosition();2064 this.$myListStyleType = val.get_listStyleType();2065 this.$myMargin = val.get_margin();2066 this.$myMarginBottom = val.get_marginBottom();2067 this.$myMarginLeft = val.get_marginLeft();2068 this.$myMarginRight = val.get_marginRight();2069 this.$myMarginTop = val.get_marginTop();2070 this.$myMaxHeight = val.get_maxHeight();2071 this.$myMaxWidth = val.get_maxWidth();2072 this.$myMinHeight = val.get_minHeight();2073 this.$myMinWidth = val.get_minWidth();2074 this.$myMsInterpolationMode = val.get_msInterpolationMode();2075 this.$myOpacity = val.get_opacity();2076 this.$myOverflow = val.get_overflow();2077 this.$myOverflowX = val.get_overflowX();2078 this.$myOverflowY = val.get_overflowY();2079 this.$myPadding = val.get_padding();2080 this.$myPaddingBottom = val.get_paddingBottom();2081 this.$myPaddingLeft = val.get_paddingLeft();2082 this.$myPaddingRight = val.get_paddingRight();2083 this.$myPaddingTop = val.get_paddingTop();2084 this.$myPageBreakAfter = val.get_pageBreakAfter();2085 this.$myPageBreakBefore = val.get_pageBreakBefore();2086 this.$myPixelBottom = val.get_pixelBottom();2087 this.$myPixelHeight = val.get_pixelHeight();2088 this.$myPixelLeft = val.get_pixelLeft();2089 this.$myPixelRight = val.get_pixelRight();2090 this.$myPixelTop = val.get_pixelTop();2091 this.$myPixelWidth = val.get_pixelWidth();2092 this.$myPosBottom = val.get_posBottom();2093 this.$myPosHeight = val.get_posHeight();2094 this.$myPosition = val.get_position();2095 this.$myPosLeft = val.get_posLeft();2096 this.$myPosRight = val.get_posRight();2097 this.$myPosTop = val.get_posTop();2098 this.$myPosWidth = val.get_posWidth();2099 this.$myRight = val.get_right();2100 this.$myStyleFloat = val.get_styleFloat();2101 this.$myTableLayout = val.get_tableLayout();2102 this.$myTextAlign = val.get_textAlign();2103 this.$myTextDecoration = val.get_textDecoration();2104 this.$myTextDecorationBlink = val.get_textDecorationBlink();2105 this.$myTextDecorationLineThrough = val.get_textDecorationLineThrough();2106 this.$myTextDecorationNone = val.get_textDecorationNone();2107 this.$myTextDecorationOverline = val.get_textDecorationOverline();2108 this.$myTextDecorationUnderline = val.get_textDecorationUnderline();2109 this.$myTextIndent = val.get_textIndent();2110 this.$myTextJustify = val.get_textJustify();2111 this.$myTextOverflow = val.get_textOverflow();2112 this.$myTextTransform = val.get_textTransform();2113 this.$myTop = val.get_top();2114 this.$myVerticalAlign = val.get_verticalAlign();2115 this.$myVisibility = val.get_visibility();2116 this.$myWhiteSpace = val.get_whiteSpace();2117 this.$myWidth = val.get_width();2118 this.$myWordSpacing = val.get_wordSpacing();2119 this.$myWordWrap = val.get_wordWrap();2120 this.$myWritingMode = val.get_writingMode();2121 this.$myZIndex = val.get_zIndex();2122 this.$myZoom = val.get_zoom();2123 };2124 $global_InternalStyle.$ctor1.prototype = $global_InternalStyle.prototype;2125 ////////////////////////////////////////////////////////////////////////////////2126 // global.CardGameOrder2127 var $global_Order = function() {2128 };2129 $global_Order.prototype = { noOrder: 0, ascending: 1, descending: 2 };2130 ss.registerEnum(global, 'global.Order', $global_Order, false);2131 ////////////////////////////////////////////////////////////////////////////////2132 // global.CardGamePile2133 var $global_Pile = function(name) {2134 this.name = null;2135 this.cards = null;2136 this.name = name;2137 this.cards = [];2138 };2139 $global_Pile.prototype = {2140 shuffle: function() {2141 var o = this.cards;2142 var x;2143 for (var j, i = o.length; i === 0; j = parseInt((Math.random() * i).toString()), x = o[--i], o[i] = o[j], o[j] = x) {2144 ;2145 }2146 //lol2147 this.cards = o;2148 }2149 };2150 ////////////////////////////////////////////////////////////////////////////////2151 // global.CardGamePokerResult2152 var $global_PokerResult = function(weight, type, cards) {2153 this.weight = 0;2154 this.state = 0;2155 this.cards = null;2156 this.weight = weight;2157 this.state = type;2158 this.cards = cards;2159 };2160 ////////////////////////////////////////////////////////////////////////////////2161 // global.CardGamePokerWinType2162 var $global_PokerWinType = function() {2163 };2164 $global_PokerWinType.prototype = { straight: 1, flush: 2, pair: 3, threeOfAKind: 4, fourOfAKind: 5, straightFlush: 6 };2165 ss.registerEnum(global, 'global.PokerWinType', $global_PokerWinType, false);2166 ////////////////////////////////////////////////////////////////////////////////2167 // global.Rectangle2168 var $global_Rectangle = function() {2169 };2170 ////////////////////////////////////////////////////////////////////////////////2171 // global.Shuff2172 var $global_shuff = function() {2173 };2174 $global_shuff.askQuestion = function(user, question, answers, cardGame) {2175 cardGame.emulating = false;2176 if (cardGame.answers.length - 1 > cardGame.answerIndex) {2177 cardGame.emulating = true;2178 return cardGame.answers[cardGame.answerIndex++].value;2179 //todo .value2180 }2181 var m = new $global_CardGameQuestion(user, question, answers, cardGame);2182 var answer = Fiber.yield(new $global_FiberYieldResponse.$ctor2(0, m));2183 cardGame.answerIndex++;2184 return (ss.isNullOrUndefined(answer) ? 0 : answer.value);2185 };2186 $global_shuff.declareWinner = function(user) {2187 Fiber.yield(new $global_FiberYieldResponse(2));2188 };2189 $global_shuff.gameOver = function() {2190 Fiber.yield(new $global_FiberYieldResponse(2));2191 };2192 $global_shuff.playersLeave = function(usersLeft) {2193 var users = Fiber.yield(new $global_FiberYieldResponse(5));2194 if (users.length > 0) {2195 usersLeft(users);2196 }2197 };2198 $global_shuff.log = function(msg) {2199 Fiber.yield(new $global_FiberYieldResponse.$ctor1(1, msg));2200 };2201 $global_shuff.break_ = function(lineNumber, cardGame, varLookup) {2202 if (cardGame.emulating) {2203 return;2204 }2205 var yieldObject = new $global_FiberYieldResponse.$ctor3(3, lineNumber - 1, '');2206 while (true) {2207 var answ = Fiber.yield(yieldObject);2208 if (ss.isNullOrUndefined(answ)) {2209 //continue2210 return;2211 }2212 if (ss.isValue(answ.variableLookup)) {2213 yieldObject = new $global_FiberYieldResponse.$ctor3(4, 0, varLookup(answ.variableLookup));2214 continue;2215 }2216 break;2217 }2218 };2219 ////////////////////////////////////////////////////////////////////////////////2220 // global.SpaceDrawing2221 var $global_SpaceDrawing = function(item1) {2222 this.outerElementStyle = null;2223 this.outerElement = null;2224 this.childNodes = null;2225 this.outerElement = item1;2226 this.childNodes = [];2227 this.outerElementStyle = new $global_InternalStyle();2228 };2229 ////////////////////////////////////////////////////////////////////////////////2230 // global.CardGameTableSpace2231 var $global_TableSpace = function(options) {2232 this.vertical = false;2233 this.x = 0;2234 this.y = 0;2235 this.width = 0;2236 this.height = 0;2237 this.pile = null;2238 this.appearance = null;2239 this.visible = false;2240 this.stackCards = false;2241 this.drawCardsBent = false;2242 this.name = null;2243 this.sortOrder = 0;2244 this.numberOfCardsHorizontal = 0;2245 this.numberOfCardsVertical = 0;2246 this.resizeType = 0;2247 this.vertical = (!options.vertical ? false : options.vertical);2248 this.x = ((options.x === 0) ? 0 : options.x);2249 this.y = ((options.y === 0) ? 0 : options.y);2250 this.width = ((options.width === 0) ? 0 : options.width);2251 this.height = ((options.height === 0) ? 0 : options.height);2252 this.pile = options.pile;2253 //Rotate = options.Rotate == 0 ? 0 : options.Rotate;2254 this.visible = (!options.visible ? true : options.visible);2255 this.stackCards = (!options.stackCards ? false : options.stackCards);2256 this.drawCardsBent = (!options.drawCardsBent ? true : options.drawCardsBent);2257 this.name = ss.coalesce(options.name, 'TableSpace');2258 this.sortOrder = options.sortOrder;2259 this.numberOfCardsHorizontal = ((options.numerOfCardsHorizontal === 0) ? 1 : options.numerOfCardsHorizontal);2260 this.numberOfCardsVertical = ((options.numerOfCardsVertical === 0) ? 1 : options.numerOfCardsVertical);2261 this.resizeType = options.resizeType;2262 //Rotate = ExtensionMethods.eval("options.rotate? options.rotate : 0");2263 this.appearance = new $global_Appearance();2264 };2265 ////////////////////////////////////////////////////////////////////////////////2266 // global.TableSpaceResizeType2267 var $global_TableSpaceResizeType = function() {2268 };2269 $global_TableSpaceResizeType.prototype = { grow: 0, static: 1 };2270 ss.registerEnum(global, 'global.TableSpaceResizeType', $global_TableSpaceResizeType, false);2271 ////////////////////////////////////////////////////////////////////////////////2272 // global.GameCardGameTextArea2273 var $global_TableTextArea = function(options) {2274 this.name = null;2275 this.x = 0;2276 this.y = 0;2277 this.text = null;2278 this.name = ss.coalesce(options.name, 'Text Area');2279 this.x = ((options.x === 0) ? 0 : options.x);2280 this.y = ((options.y === 0) ? 0 : options.y);2281 this.text = ss.coalesce(options.text, 'Text');2282 };2283 ////////////////////////////////////////////////////////////////////////////////2284 // global.CardGameUser2285 var $global_User = function(name) {2286 this.userName = null;2287 this.playerDealingOrder = 0;2288 this.cards = null;2289 this.userName = name;2290 this.cards = new $global_Pile(name);2291 };2292 ss.registerClass(global, 'global._', $global__);2293 ss.registerClass(global, 'global.Effect', $global_Effect);2294 ss.registerClass(global, 'global.AnimatedEffect', $global_AnimatedEffect, $global_Effect);2295 ss.registerClass(global, 'global.AnimatedEffect$Between', $global_AnimatedEffect$Between, $global_AnimatedEffect);2296 ss.registerClass(global, 'global.AppearanceStyle', $global_AppearanceStyle);2297 ss.registerClass(global, 'global.Appearance', $global_Appearance, $global_AppearanceStyle);2298 ss.registerClass(global, 'global.AppearanceStyleBorder', $global_AppearanceStyleBorder);2299 ss.registerClass(global, 'global.AppearanceStyleBorderArea', $global_AppearanceStyleBorderArea);2300 ss.registerClass(global, 'global.AppearanceStyleItem', $global_AppearanceStyleItem);2301 ss.registerClass(global, 'global.AppearanceStyleMargin', $global_AppearanceStyleMargin);2302 ss.registerClass(global, 'global.AppearanceStylePadding', $global_AppearanceStylePadding);2303 ss.registerClass(global, 'global.ArrayUtils', $global_ArrayUtils);2304 ss.registerClass(global, 'global.Card', $global_Card);2305 ss.registerClass(global, 'global.CardDrawing', $global_CardDrawing);2306 ss.registerClass(global, 'global.CardGame', $global_CardGame);2307 ss.registerClass(global, 'global.CardGameAnswer', $global_CardGameAnswer);2308 ss.registerClass(global, 'global.CardGameArea', $global_CardGameArea);2309 ss.registerClass(global, 'global.CardGameEffectBendOptions', $global_CardGameEffectBendOptions);2310 ss.registerClass(global, 'global.CardGameEffectHighlightOptions', $global_CardGameEffectHighlightOptions);2311 ss.registerClass(global, 'global.CardGameEffectRotateOptions', $global_CardGameEffectRotateOptions);2312 ss.registerClass(global, 'global.CardGameQuestion', $global_CardGameQuestion);2313 ss.registerClass(global, 'global.CardGameTableSpaceOptions', $global_CardGameTableSpaceOptions);2314 ss.registerClass(global, 'global.domUtils', $global_domUtils);2315 ss.registerClass(global, 'global.Effect$Bend', $global_Effect$Bend, $global_Effect);2316 ss.registerClass(global, 'global.Effect$Highlight', $global_Effect$Highlight, $global_Effect);2317 ss.registerClass(global, 'global.Effect$Rotate', $global_Effect$Rotate, $global_Effect);2318 ss.registerClass(global, 'global.Effect$StyleProperty', $global_Effect$StyleProperty, $global_Effect);2319 ss.registerClass(global, 'global.FiberYieldResponse', $global_FiberYieldResponse);2320 ss.registerClass(global, 'global.GameCardGameOptions', $global_GameCardGameOptions);2321 ss.registerClass(global, 'global.GameCardGameTextAreaOptions', $global_GameCardGameTextAreaOptions);2322 ss.registerClass(global, 'global.InternalStyle', $global_InternalStyle);2323 ss.registerClass(global, 'global.Pile', $global_Pile);2324 ss.registerClass(global, 'global.PokerResult', $global_PokerResult);2325 ss.registerClass(global, 'global.Rectangle', $global_Rectangle);2326 ss.registerClass(global, 'global.shuff', $global_shuff);2327 ss.registerClass(global, 'global.SpaceDrawing', $global_SpaceDrawing);2328 ss.registerClass(global, 'global.TableSpace', $global_TableSpace);2329 ss.registerClass(global, 'global.TableTextArea', $global_TableTextArea);2330 ss.registerClass(global, 'global.User', $global_User);2331 eval('Array.prototype.foreach=function(does){return global.ArrayUtils.forEach(this,does);};');2332 eval('Array.prototype.sortCards=function(){return global.ArrayUtils.sortCards(this);};');2333 eval('Array.prototype.where=function(does){return global.ArrayUtils.where(this,does);};');2334 eval('Array.prototype.any=function(does){return global.ArrayUtils.any(this,does);};');2335 eval('Array.prototype.remove=function(does){ this.splice(this.indexOf(does),1); };');...

Full Screen

Full Screen

talelogicinline.js

Source:talelogicinline.js Github

copy

Full Screen

...23 'default': '-1',24 validate: CKEDITOR.dialog.validate.notEqual( "-1", "First variable field cannot be empty." ),25 setup: function ( widget ) {26 if (widget.data.var_1_1 != null)27 this.setValue(widget.data.var_1_1);28 },29 commit: function ( widget ) {30 widget.setData('var_1_1', this.getValue());31 var element = this.getInputElement().$;32 var elementDesc = element.options[element.selectedIndex].text;33 widget.setData('varDesc_1_1', elementDesc);34 }35 },36 {37 type: 'select',38 id: 'logic-1-1',39 items: ckeditor_talelogic_condition_list,40 'default': '-1',41 validate: CKEDITOR.dialog.validate.notEqual( "-1", "First condition field cannot be empty." ),42 setup: function ( widget ) {43 if (widget.data.logic_1_1 != null)44 this.setValue(widget.data.logic_1_1);45 },46 commit: function ( widget ) {47 widget.setData('logic_1_1', this.getValue())48 }49 },50 {51 type: 'text',52 id: 'value-1-1',53 validate: function() {54 var value = this.getValue();55 if ( !value || isNaN(value) || parseFloat(value) != parseInt(value)) {56 alert('First value field cannot be empty and should be an integer.' );57 return false;58 }59 },60 setup: function ( widget ) {61 if (widget.data.value_1_1 != null)62 this.setValue(widget.data.value_1_1);63 },64 commit: function ( widget ) {65 widget.setData('value_1_1', this.getValue())66 }67 }68 ]69 },70 {71 type: 'hbox',72 widths: [ '40%', '40%', '20%' ],73 children: [74 {75 type: 'select',76 id: 'var-1-2',77 items: ckeditor_talelogic_variable_list,78 default: '-1',79 setup: function ( widget ) {80 if (widget.data.var_1_2 != null)81 this.setValue(widget.data.var_1_2);82 },83 commit: function ( widget ) {84 widget.setData('var_1_2', this.getValue());85 var element = this.getInputElement().$;86 var elementDesc = element.options[element.selectedIndex].text;87 widget.setData('varDesc_1_2', elementDesc);88 }89 },90 {91 type: 'select',92 id: 'logic-1-2',93 items: ckeditor_talelogic_condition_list,94 default: '-1',95 setup: function ( widget ) {96 if (widget.data.logic_1_2 != null)97 this.setValue(widget.data.logic_1_2);98 },99 commit: function ( widget ) {100 widget.setData('logic_1_2', this.getValue())101 }102 },103 {104 type: 'text',105 id: 'value-1-2',106 setup: function ( widget ) {107 if (widget.data.value_1_2 != null)108 this.setValue(widget.data.value_1_2);109 },110 commit: function ( widget ) {111 widget.setData('value_1_2', this.getValue())112 }113 }114 ]115 },116 {117 type: 'hbox',118 widths: [ '40%', '40%', '20%' ],119 children: [120 {121 type: 'select',122 id: 'var-1-3',123 items: ckeditor_talelogic_variable_list,124 default: '-1',125 setup: function ( widget ) {126 if (widget.data.var_1_3 != null)127 this.setValue(widget.data.var_1_3);128 },129 commit: function ( widget ) {130 widget.setData('var_1_3', this.getValue());131 var element = this.getInputElement().$;132 var elementDesc = element.options[element.selectedIndex].text;133 widget.setData('varDesc_1_3', elementDesc);134 }135 },136 {137 type: 'select',138 id: 'logic-1-3',139 items: ckeditor_talelogic_condition_list,140 default: '-1',141 setup: function ( widget ) {142 if (widget.data.logic_1_3 != null)143 this.setValue(widget.data.logic_1_3);144 },145 commit: function ( widget ) {146 widget.setData('logic_1_3', this.getValue())147 }148 },149 {150 type: 'text',151 id: 'value-1-3',152 setup: function ( widget ) {153 if (widget.data.value_1_3 != null)154 this.setValue(widget.data.value_1_3);155 },156 commit: function ( widget ) {157 widget.setData('value_1_3', this.getValue())158 }159 }160 ]161 }162 ]163 },164 {165 id: 'tab-conj-2',166 label: 'Conjunction Group 2',167 elements: [168 {169 type: 'hbox',170 widths: [ '40%', '40%', '20%' ],171 children: [172 {173 type: 'select',174 id: 'var-2-1',175 items: ckeditor_talelogic_variable_list,176 default: '-1',177 setup: function ( widget ) {178 if (widget.data.var_2_1 != null)179 this.setValue(widget.data.var_2_1);180 },181 commit: function ( widget ) {182 widget.setData('var_2_1', this.getValue());183 var element = this.getInputElement().$;184 var elementDesc = element.options[element.selectedIndex].text;185 widget.setData('varDesc_2_1', elementDesc);186 }187 },188 {189 type: 'select',190 id: 'logic-2-1',191 items: ckeditor_talelogic_condition_list,192 default: '-1',193 setup: function ( widget ) {194 if (widget.data.logic_2_1 != null)195 this.setValue(widget.data.logic_2_1);196 },197 commit: function ( widget ) {198 widget.setData('logic_2_1', this.getValue())199 }200 },201 {202 type: 'text',203 id: 'value-2-1',204 setup: function ( widget ) {205 if (widget.data.value_2_1 != null)206 this.setValue(widget.data.value_2_1);207 },208 commit: function ( widget ) {209 widget.setData('value_2_1', this.getValue())210 }211 }212 ]213 },214 {215 type: 'hbox',216 widths: [ '40%', '40%', '20%' ],217 children: [218 {219 type: 'select',220 id: 'var-2-2',221 items: ckeditor_talelogic_variable_list,222 default: '-1',223 setup: function ( widget ) {224 if (widget.data.var_2_2 != null)225 this.setValue(widget.data.var_2_2);226 },227 commit: function ( widget ) {228 widget.setData('var_2_2', this.getValue());229 var element = this.getInputElement().$;230 var elementDesc = element.options[element.selectedIndex].text;231 widget.setData('varDesc_2_2', elementDesc);232 }233 },234 {235 type: 'select',236 id: 'logic-2-2',237 items: ckeditor_talelogic_condition_list,238 default: '-1',239 setup: function ( widget ) {240 if (widget.data.logic_2_2 != null)241 this.setValue(widget.data.logic_2_2);242 },243 commit: function ( widget ) {244 widget.setData('logic_2_2', this.getValue())245 }246 },247 {248 type: 'text',249 id: 'value-2-2',250 setup: function ( widget ) {251 if (widget.data.value_2_2 != null)252 this.setValue(widget.data.value_2_2);253 },254 commit: function ( widget ) {255 widget.setData('value_2_2', this.getValue())256 }257 }258 ]259 },260 {261 type: 'hbox',262 widths: [ '40%', '40%', '20%' ],263 children: [264 {265 type: 'select',266 id: 'var-2-3',267 items: ckeditor_talelogic_variable_list,268 default: '-1',269 setup: function ( widget ) {270 if (widget.data.var_2_3 != null)271 this.setValue(widget.data.var_2_3);272 },273 commit: function ( widget ) {274 widget.setData('var_2_3', this.getValue());275 var element = this.getInputElement().$;276 var elementDesc = element.options[element.selectedIndex].text;277 widget.setData('varDesc_2_3', elementDesc);278 }279 },280 {281 type: 'select',282 id: 'logic-2-3',283 items: ckeditor_talelogic_condition_list,284 default: '-1',285 setup: function ( widget ) {286 if (widget.data.logic_2_3 != null)287 this.setValue(widget.data.logic_2_3);288 },289 commit: function ( widget ) {290 widget.setData('logic_2_3', this.getValue())291 }292 },293 {294 type: 'text',295 id: 'value-2-3',296 setup: function ( widget ) {297 if (widget.data.value_2_3 != null)298 this.setValue(widget.data.value_2_3);299 },300 commit: function ( widget ) {301 widget.setData('value_2_3', this.getValue())302 }303 }304 ]305 }306 ]307 },308 {309 id: 'tab-conj-3',310 label: 'Conjunction Group 3',311 elements: [312 {313 type: 'hbox',314 widths: [ '40%', '40%', '20%' ],315 children: [316 {317 type: 'select',318 id: 'var-3-1',319 items: ckeditor_talelogic_variable_list,320 default: '-1',321 setup: function ( widget ) {322 if (widget.data.var_3_1 != null)323 this.setValue(widget.data.var_3_1);324 },325 commit: function ( widget ) {326 widget.setData('var_3_1', this.getValue());327 var element = this.getInputElement().$;328 var elementDesc = element.options[element.selectedIndex].text;329 widget.setData('varDesc_3_1', elementDesc);330 }331 },332 {333 type: 'select',334 id: 'logic-3-1',335 items: ckeditor_talelogic_condition_list,336 default: '-1',337 setup: function ( widget ) {338 if (widget.data.logic_3_1 != null)339 this.setValue(widget.data.logic_3_1);340 },341 commit: function ( widget ) {342 widget.setData('logic_3_1', this.getValue())343 }344 },345 {346 type: 'text',347 id: 'value-3-1',348 setup: function ( widget ) {349 if (widget.data.value_3_1 != null)350 this.setValue(widget.data.value_3_1);351 },352 commit: function ( widget ) {353 widget.setData('value_3_1', this.getValue())354 }355 }356 ]357 },358 {359 type: 'hbox',360 widths: [ '40%', '40%', '20%' ],361 children: [362 {363 type: 'select',364 id: 'var-3-2',365 items: ckeditor_talelogic_variable_list,366 default: '-1',367 setup: function ( widget ) {368 if (widget.data.var_3_2 != null)369 this.setValue(widget.data.var_3_2);370 },371 commit: function ( widget ) {372 widget.setData('var_3_2', this.getValue());373 var element = this.getInputElement().$;374 var elementDesc = element.options[element.selectedIndex].text;375 widget.setData('varDesc_3_2', elementDesc);376 }377 },378 {379 type: 'select',380 id: 'logic-3-2',381 items: ckeditor_talelogic_condition_list,382 default: '-1',383 setup: function ( widget ) {384 if (widget.data.logic_3_2 != null)385 this.setValue(widget.data.logic_3_2);386 },387 commit: function ( widget ) {388 widget.setData('logic_3_2', this.getValue())389 }390 },391 {392 type: 'text',393 id: 'value-3-2',394 setup: function ( widget ) {395 if (widget.data.value_3_2 != null)396 this.setValue(widget.data.value_3_2);397 },398 commit: function ( widget ) {399 widget.setData('value_3_2', this.getValue())400 }401 }402 ]403 },404 {405 type: 'hbox',406 widths: [ '40%', '40%', '20%' ],407 children: [408 {409 type: 'select',410 id: 'var-3-3',411 items: ckeditor_talelogic_variable_list,412 default: '-1',413 setup: function ( widget ) {414 if (widget.data.var_3_3 != null)415 this.setValue(widget.data.var_3_3);416 },417 commit: function ( widget ) {418 widget.setData('var_3_3', this.getValue());419 var element = this.getInputElement().$;420 var elementDesc = element.options[element.selectedIndex].text;421 widget.setData('varDesc_3_3', elementDesc);422 }423 },424 {425 type: 'select',426 id: 'logic-3-3',427 items: ckeditor_talelogic_condition_list,428 default: '-1',429 setup: function ( widget ) {430 if (widget.data.logic_3_3 != null)431 this.setValue(widget.data.logic_3_3);432 },433 commit: function ( widget ) {434 widget.setData('logic_3_3', this.getValue())435 }436 },437 {438 type: 'text',439 id: 'value-3-3',440 setup: function ( widget ) {441 if (widget.data.value_3_3 != null)442 this.setValue(widget.data.value_3_3);443 },444 commit: function ( widget ) {445 widget.setData('value_3_3', this.getValue())446 }447 }448 ]449 }450 ]451 }452 ]453 };...

Full Screen

Full Screen

talelogic.js

Source:talelogic.js Github

copy

Full Screen

...23 'default': '-1',24 validate: CKEDITOR.dialog.validate.notEqual( "-1", "First variable field cannot be empty." ),25 setup: function ( widget ) {26 if (widget.data.var_1_1 != null)27 this.setValue(widget.data.var_1_1);28 },29 commit: function ( widget ) {30 widget.setData('var_1_1', this.getValue());31 var element = this.getInputElement().$;32 var elementDesc = element.options[element.selectedIndex].text;33 widget.setData('varDesc_1_1', elementDesc);34 }35 },36 {37 type: 'select',38 id: 'logic-1-1',39 items: ckeditor_talelogic_condition_list,40 'default': '-1',41 validate: CKEDITOR.dialog.validate.notEqual( "-1", "First condition field cannot be empty." ),42 setup: function ( widget ) {43 if (widget.data.logic_1_1 != null)44 this.setValue(widget.data.logic_1_1);45 },46 commit: function ( widget ) {47 widget.setData('logic_1_1', this.getValue())48 }49 },50 {51 type: 'text',52 id: 'value-1-1',53 validate: function() {54 var value = this.getValue();55 if ( !value || isNaN(value) || parseFloat(value) != parseInt(value)) {56 alert('First value field cannot be empty and should be an integer.' );57 return false;58 }59 },60 setup: function ( widget ) {61 if (widget.data.value_1_1 != null)62 this.setValue(widget.data.value_1_1);63 },64 commit: function ( widget ) {65 widget.setData('value_1_1', this.getValue())66 }67 }68 ]69 },70 {71 type: 'hbox',72 widths: [ '40%', '40%', '20%' ],73 children: [74 {75 type: 'select',76 id: 'var-1-2',77 items: ckeditor_talelogic_variable_list,78 default: '-1',79 setup: function ( widget ) {80 if (widget.data.var_1_2 != null)81 this.setValue(widget.data.var_1_2);82 },83 commit: function ( widget ) {84 widget.setData('var_1_2', this.getValue());85 var element = this.getInputElement().$;86 var elementDesc = element.options[element.selectedIndex].text;87 widget.setData('varDesc_1_2', elementDesc);88 }89 },90 {91 type: 'select',92 id: 'logic-1-2',93 items: ckeditor_talelogic_condition_list,94 default: '-1',95 setup: function ( widget ) {96 if (widget.data.logic_1_2 != null)97 this.setValue(widget.data.logic_1_2);98 },99 commit: function ( widget ) {100 widget.setData('logic_1_2', this.getValue())101 }102 },103 {104 type: 'text',105 id: 'value-1-2',106 setup: function ( widget ) {107 if (widget.data.value_1_2 != null)108 this.setValue(widget.data.value_1_2);109 },110 commit: function ( widget ) {111 widget.setData('value_1_2', this.getValue())112 }113 }114 ]115 },116 {117 type: 'hbox',118 widths: [ '40%', '40%', '20%' ],119 children: [120 {121 type: 'select',122 id: 'var-1-3',123 items: ckeditor_talelogic_variable_list,124 default: '-1',125 setup: function ( widget ) {126 if (widget.data.var_1_3 != null)127 this.setValue(widget.data.var_1_3);128 },129 commit: function ( widget ) {130 widget.setData('var_1_3', this.getValue());131 var element = this.getInputElement().$;132 var elementDesc = element.options[element.selectedIndex].text;133 widget.setData('varDesc_1_3', elementDesc);134 }135 },136 {137 type: 'select',138 id: 'logic-1-3',139 items: ckeditor_talelogic_condition_list,140 default: '-1',141 setup: function ( widget ) {142 if (widget.data.logic_1_3 != null)143 this.setValue(widget.data.logic_1_3);144 },145 commit: function ( widget ) {146 widget.setData('logic_1_3', this.getValue())147 }148 },149 {150 type: 'text',151 id: 'value-1-3',152 setup: function ( widget ) {153 if (widget.data.value_1_3 != null)154 this.setValue(widget.data.value_1_3);155 },156 commit: function ( widget ) {157 widget.setData('value_1_3', this.getValue())158 }159 }160 ]161 }162 ]163 },164 {165 id: 'tab-conj-2',166 label: 'Conjunction Group 2',167 elements: [168 {169 type: 'hbox',170 widths: [ '40%', '40%', '20%' ],171 children: [172 {173 type: 'select',174 id: 'var-2-1',175 items: ckeditor_talelogic_variable_list,176 default: '-1',177 setup: function ( widget ) {178 if (widget.data.var_2_1 != null)179 this.setValue(widget.data.var_2_1);180 },181 commit: function ( widget ) {182 widget.setData('var_2_1', this.getValue());183 var element = this.getInputElement().$;184 var elementDesc = element.options[element.selectedIndex].text;185 widget.setData('varDesc_2_1', elementDesc);186 }187 },188 {189 type: 'select',190 id: 'logic-2-1',191 items: ckeditor_talelogic_condition_list,192 default: '-1',193 setup: function ( widget ) {194 if (widget.data.logic_2_1 != null)195 this.setValue(widget.data.logic_2_1);196 },197 commit: function ( widget ) {198 widget.setData('logic_2_1', this.getValue())199 }200 },201 {202 type: 'text',203 id: 'value-2-1',204 setup: function ( widget ) {205 if (widget.data.value_2_1 != null)206 this.setValue(widget.data.value_2_1);207 },208 commit: function ( widget ) {209 widget.setData('value_2_1', this.getValue())210 }211 }212 ]213 },214 {215 type: 'hbox',216 widths: [ '40%', '40%', '20%' ],217 children: [218 {219 type: 'select',220 id: 'var-2-2',221 items: ckeditor_talelogic_variable_list,222 default: '-1',223 setup: function ( widget ) {224 if (widget.data.var_2_2 != null)225 this.setValue(widget.data.var_2_2);226 },227 commit: function ( widget ) {228 widget.setData('var_2_2', this.getValue());229 var element = this.getInputElement().$;230 var elementDesc = element.options[element.selectedIndex].text;231 widget.setData('varDesc_2_2', elementDesc);232 }233 },234 {235 type: 'select',236 id: 'logic-2-2',237 items: ckeditor_talelogic_condition_list,238 default: '-1',239 setup: function ( widget ) {240 if (widget.data.logic_2_2 != null)241 this.setValue(widget.data.logic_2_2);242 },243 commit: function ( widget ) {244 widget.setData('logic_2_2', this.getValue())245 }246 },247 {248 type: 'text',249 id: 'value-2-2',250 setup: function ( widget ) {251 if (widget.data.value_2_2 != null)252 this.setValue(widget.data.value_2_2);253 },254 commit: function ( widget ) {255 widget.setData('value_2_2', this.getValue())256 }257 }258 ]259 },260 {261 type: 'hbox',262 widths: [ '40%', '40%', '20%' ],263 children: [264 {265 type: 'select',266 id: 'var-2-3',267 items: ckeditor_talelogic_variable_list,268 default: '-1',269 setup: function ( widget ) {270 if (widget.data.var_2_3 != null)271 this.setValue(widget.data.var_2_3);272 },273 commit: function ( widget ) {274 widget.setData('var_2_3', this.getValue());275 var element = this.getInputElement().$;276 var elementDesc = element.options[element.selectedIndex].text;277 widget.setData('varDesc_2_3', elementDesc);278 }279 },280 {281 type: 'select',282 id: 'logic-2-3',283 items: ckeditor_talelogic_condition_list,284 default: '-1',285 setup: function ( widget ) {286 if (widget.data.logic_2_3 != null)287 this.setValue(widget.data.logic_2_3);288 },289 commit: function ( widget ) {290 widget.setData('logic_2_3', this.getValue())291 }292 },293 {294 type: 'text',295 id: 'value-2-3',296 setup: function ( widget ) {297 if (widget.data.value_2_3 != null)298 this.setValue(widget.data.value_2_3);299 },300 commit: function ( widget ) {301 widget.setData('value_2_3', this.getValue())302 }303 }304 ]305 }306 ]307 },308 {309 id: 'tab-conj-3',310 label: 'Conjunction Group 3',311 elements: [312 {313 type: 'hbox',314 widths: [ '40%', '40%', '20%' ],315 children: [316 {317 type: 'select',318 id: 'var-3-1',319 items: ckeditor_talelogic_variable_list,320 default: '-1',321 setup: function ( widget ) {322 if (widget.data.var_3_1 != null)323 this.setValue(widget.data.var_3_1);324 },325 commit: function ( widget ) {326 widget.setData('var_3_1', this.getValue());327 var element = this.getInputElement().$;328 var elementDesc = element.options[element.selectedIndex].text;329 widget.setData('varDesc_3_1', elementDesc);330 }331 },332 {333 type: 'select',334 id: 'logic-3-1',335 items: ckeditor_talelogic_condition_list,336 default: '-1',337 setup: function ( widget ) {338 if (widget.data.logic_3_1 != null)339 this.setValue(widget.data.logic_3_1);340 },341 commit: function ( widget ) {342 widget.setData('logic_3_1', this.getValue())343 }344 },345 {346 type: 'text',347 id: 'value-3-1',348 setup: function ( widget ) {349 if (widget.data.value_3_1 != null)350 this.setValue(widget.data.value_3_1);351 },352 commit: function ( widget ) {353 widget.setData('value_3_1', this.getValue())354 }355 }356 ]357 },358 {359 type: 'hbox',360 widths: [ '40%', '40%', '20%' ],361 children: [362 {363 type: 'select',364 id: 'var-3-2',365 items: ckeditor_talelogic_variable_list,366 default: '-1',367 setup: function ( widget ) {368 if (widget.data.var_3_2 != null)369 this.setValue(widget.data.var_3_2);370 },371 commit: function ( widget ) {372 widget.setData('var_3_2', this.getValue());373 var element = this.getInputElement().$;374 var elementDesc = element.options[element.selectedIndex].text;375 widget.setData('varDesc_3_2', elementDesc);376 }377 },378 {379 type: 'select',380 id: 'logic-3-2',381 items: ckeditor_talelogic_condition_list,382 default: '-1',383 setup: function ( widget ) {384 if (widget.data.logic_3_2 != null)385 this.setValue(widget.data.logic_3_2);386 },387 commit: function ( widget ) {388 widget.setData('logic_3_2', this.getValue())389 }390 },391 {392 type: 'text',393 id: 'value-3-2',394 setup: function ( widget ) {395 if (widget.data.value_3_2 != null)396 this.setValue(widget.data.value_3_2);397 },398 commit: function ( widget ) {399 widget.setData('value_3_2', this.getValue())400 }401 }402 ]403 },404 {405 type: 'hbox',406 widths: [ '40%', '40%', '20%' ],407 children: [408 {409 type: 'select',410 id: 'var-3-3',411 items: ckeditor_talelogic_variable_list,412 default: '-1',413 setup: function ( widget ) {414 if (widget.data.var_3_3 != null)415 this.setValue(widget.data.var_3_3);416 },417 commit: function ( widget ) {418 widget.setData('var_3_3', this.getValue());419 var element = this.getInputElement().$;420 var elementDesc = element.options[element.selectedIndex].text;421 widget.setData('varDesc_3_3', elementDesc);422 }423 },424 {425 type: 'select',426 id: 'logic-3-3',427 items: ckeditor_talelogic_condition_list,428 default: '-1',429 setup: function ( widget ) {430 if (widget.data.logic_3_3 != null)431 this.setValue(widget.data.logic_3_3);432 },433 commit: function ( widget ) {434 widget.setData('logic_3_3', this.getValue())435 }436 },437 {438 type: 'text',439 id: 'value-3-3',440 setup: function ( widget ) {441 if (widget.data.value_3_3 != null)442 this.setValue(widget.data.value_3_3);443 },444 commit: function ( widget ) {445 widget.setData('value_3_3', this.getValue())446 }447 }448 ]449 }450 ]451 }452 ]453 };...

Full Screen

Full Screen

table.js

Source:table.js Github

copy

Full Screen

...154 }155 return h;156 },157 setup: function(h){158 this.setValue(h.$.rows.length);159 },160 commit: c161 }, {162 type: 'text',163 id: 'txtCols',164 'default': 2,165 label: e.lang.table.columns,166 style: 'width:5em',167 validate: function(){168 var h = true, i = this.getValue();169 h = h && CKEDITOR.dialog.validate.integer()(i) && i > 0;170 if (!h) {171 alert(e.lang.table.invalidCols);172 this.select();173 }174 return h;175 },176 setup: function(h){177 this.setValue(h.$.rows[0].cells.length);178 },179 commit: c180 }, {181 type: 'html',182 html: '&nbsp;'183 }, {184 type: 'select',185 id: 'selHeaders',186 'default': '',187 label: e.lang.table.headers,188 items: [[e.lang.table.headersNone, ''], [e.lang.table.headersRow, 'row'], [e.lang.table.headersColumn, 'col'], [e.lang.table.headersBoth, 'both']],189 setup: function(h){190 var i = this.getDialog();191 i.hasColumnHeaders = true;192 for (var j = 0; j < h.$.rows.length; j++) {193 if (h.$.rows[j].cells[0].nodeName.toLowerCase() != 'th') {194 i.hasColumnHeaders = false;195 break;196 }197 }198 if (h.$.tHead !== null) 199 this.setValue(i.hasColumnHeaders ? 'both' : 'row');200 else 201 this.setValue(i.hasColumnHeaders ? 'col' : '');202 },203 commit: c204 }, {205 type: 'text',206 id: 'txtBorder',207 'default': 1,208 label: e.lang.table.border,209 style: 'width:3em',210 validate: CKEDITOR.dialog.validate.number(e.lang.table.invalidBorder),211 setup: function(h){212 this.setValue(h.getAttribute('border') || '');213 },214 commit: function(h, i){215 if (this.getValue()) 216 i.setAttribute('border', this.getValue());217 else 218 i.removeAttribute('border');219 }220 }, {221 id: 'cmbAlign',222 type: 'select',223 'default': '',224 label: e.lang.table.align,225 items: [[e.lang.common.notSet, ''], [e.lang.table.alignLeft, 'left'], [e.lang.table.alignCenter, 'center'], [e.lang.table.alignRight, 'right']],226 setup: function(h){227 this.setValue(h.getAttribute('align') || '');228 },229 commit: function(h, i){230 if (this.getValue()) 231 i.setAttribute('align', this.getValue());232 else 233 i.removeAttribute('align');234 }235 }]236 }, {237 type: 'vbox',238 padding: 0,239 children: [{240 type: 'hbox',241 widths: ['5em'],242 children: [{243 type: 'text',244 id: 'txtWidth',245 style: 'width:5em',246 label: e.lang.table.width,247 'default': 200,248 validate: CKEDITOR.dialog.validate.number(e.lang.table.invalidWidth),249 onLoad: function(){250 var h = this.getDialog().getContentElement('info', 'cmbWidthType'), i = h.getElement(), j = this.getInputElement(), k = j.getAttribute('aria-labelledby');251 j.setAttribute('aria-labelledby', [k, i.$.id].join(' '));252 },253 setup: function(h){254 var i = a.exec(h.$.style.width);255 if (i) 256 this.setValue(i[1]);257 else 258 this.setValue('');259 },260 commit: c261 }, {262 id: 'cmbWidthType',263 type: 'select',264 label: e.lang.table.widthUnit,265 labelStyle: 'visibility:hidden',266 'default': 'pixels',267 items: [[e.lang.table.widthPx, 'pixels'], [e.lang.table.widthPc, 'percents']],268 setup: function(h){269 var i = a.exec(h.$.style.width);270 if (i) 271 this.setValue(i[2] == 'px' ? 'pixels' : 'percents');272 },273 commit: c274 }]275 }, {276 type: 'hbox',277 widths: ['5em'],278 children: [{279 type: 'text',280 id: 'txtHeight',281 style: 'width:5em',282 label: e.lang.table.height,283 'default': '',284 validate: CKEDITOR.dialog.validate.number(e.lang.table.invalidHeight),285 onLoad: function(){286 var h = this.getDialog().getContentElement('info', 'htmlHeightType'), i = h.getElement(), j = this.getInputElement(), k = j.getAttribute('aria-labelledby');287 j.setAttribute('aria-labelledby', [k, i.$.id].join(' '));288 },289 setup: function(h){290 var i = b.exec(h.$.style.height);291 if (i) 292 this.setValue(i[1]);293 },294 commit: c295 }, {296 id: 'htmlHeightType',297 type: 'html',298 html: '<div><br />' + e.lang.table.widthPx + '</div>'299 }]300 }, {301 type: 'html',302 html: '&nbsp;'303 }, {304 type: 'text',305 id: 'txtCellSpace',306 style: 'width:3em',307 label: e.lang.table.cellSpace,308 'default': 1,309 validate: CKEDITOR.dialog.validate.number(e.lang.table.invalidCellSpacing),310 setup: function(h){311 this.setValue(h.getAttribute('cellSpacing') || '');312 },313 commit: function(h, i){314 if (this.getValue()) 315 i.setAttribute('cellSpacing', this.getValue());316 else 317 i.removeAttribute('cellSpacing');318 }319 }, {320 type: 'text',321 id: 'txtCellPad',322 style: 'width:3em',323 label: e.lang.table.cellPad,324 'default': 1,325 validate: CKEDITOR.dialog.validate.number(e.lang.table.invalidCellPadding),326 setup: function(h){327 this.setValue(h.getAttribute('cellPadding') || '');328 },329 commit: function(h, i){330 if (this.getValue()) 331 i.setAttribute('cellPadding', this.getValue());332 else 333 i.removeAttribute('cellPadding');334 }335 }, {336 type: 'text',337 id: 'txtClass',338 style: 'width:12em',339 label: 'Třída (šablona vzhledu)',340 setup: function(h){341 this.setValue(h.getAttribute('class') || '');342 },343 commit: function(h, i){344 if (this.getValue()) 345 i.setAttribute('class', this.getValue());346 else 347 i.removeAttribute('class');348 }349 }]350 }]351 }, {352 type: 'html',353 align: 'right',354 html: ''355 }, {356 type: 'vbox',357 padding: 0,358 children: [{359 type: 'text',360 id: 'txtCaption',361 label: e.lang.table.caption,362 setup: function(h){363 var i = h.getElementsByTag('caption');364 if (i.count() > 0) {365 var j = i.getItem(0);366 j = j.getChild(0) && j.getChild(0).getText() || '';367 j = CKEDITOR.tools.trim(j);368 this.setValue(j);369 }370 },371 commit: function(h, i){372 var j = this.getValue(), k = i.getElementsByTag('caption');373 if (j) {374 if (k.count() > 0) {375 k = k.getItem(0);376 k.setHtml('');377 }378 else {379 k = new CKEDITOR.dom.element('caption', e.document);380 if (i.getChildCount()) 381 k.insertBefore(i.getFirst());382 else 383 k.appendTo(i);384 }385 k.append(new CKEDITOR.dom.text(j, e.document));386 }387 else 388 if (k.count() > 0) 389 for (var l = k.count() - 1; l >= 0; l--) 390 k.getItem(l).remove();391 }392 }, {393 type: 'text',394 id: 'txtSummary',395 label: e.lang.table.summary,396 setup: function(h){397 this.setValue(h.getAttribute('summary') || '');398 },399 commit: function(h, i){400 if (this.getValue()) 401 i.setAttribute('summary', this.getValue());402 }403 }]404 }]405 }]406 };407 };408 CKEDITOR.dialog.add('table', function(e){409 return d(e, 'table');410 });411 CKEDITOR.dialog.add('tableProperties', function(e){ ...

Full Screen

Full Screen

tableCell.js

Source:tableCell.js Github

copy

Full Screen

...14 var a = this.getDialog().getContentElement("info", "widthType").getElement(), b = this.getInputElement(), c = b.getAttribute("aria-labelledby");15 b.setAttribute("aria-labelledby", [c, a.$.id].join(" "))16 }, setup: function (a) {17 var b = parseInt(a.getAttribute("width"), 10), a = parseInt(a.getStyle("width"), 10);18 !isNaN(b) && this.setValue(b);19 !isNaN(a) && this.setValue(a)20 },21 commit: function (a) {22 var b = parseInt(this.getValue(), 10), c = this.getDialog().getValueOf("info", "widthType");23 isNaN(b) ? a.removeStyle("width") : a.setStyle("width", b + c);24 a.removeAttribute("width")25 }, "default": ""},26 {type: "select", id: "widthType", label: f.lang.table.widthUnit, labelStyle: "visibility:hidden", "default": "px", items: [27 [g.widthPx, "px"],28 [g.widthPc, "%"]29 ], setup: function (a) {30 (a = j.exec(a.getStyle("width") || a.getAttribute("width"))) && this.setValue(a[2])31 }}32 ]},33 {type: "hbox", widths: ["70%", "30%"], children: [34 {type: "text",35 id: "height", label: d.height, width: "100px", "default": "", validate: h.number(c.invalidHeight), onLoad: function () {36 var a = this.getDialog().getContentElement("info", "htmlHeightType").getElement(), b = this.getInputElement(), c = b.getAttribute("aria-labelledby");37 b.setAttribute("aria-labelledby", [c, a.$.id].join(" "))38 }, setup: function (a) {39 var b = parseInt(a.getAttribute("height"), 10), a = parseInt(a.getStyle("height"), 10);40 !isNaN(b) && this.setValue(b);41 !isNaN(a) && this.setValue(a)42 }, commit: function (a) {43 var b = parseInt(this.getValue(),44 10);45 isNaN(b) ? a.removeStyle("height") : a.setStyle("height", CKEDITOR.tools.cssLength(b));46 a.removeAttribute("height")47 }},48 {id: "htmlHeightType", type: "html", html: "<br />" + g.widthPx}49 ]},50 e,51 {type: "select", id: "wordWrap", label: c.wordWrap, "default": "yes", items: [52 [c.yes, "yes"],53 [c.no, "no"]54 ], setup: function (a) {55 var b = a.getAttribute("noWrap");56 ("nowrap" == a.getStyle("white-space") || b) && this.setValue("no")57 }, commit: function (a) {58 "no" == this.getValue() ? a.setStyle("white-space", "nowrap") : a.removeStyle("white-space");59 a.removeAttribute("noWrap")60 }},61 e,62 {type: "select", id: "hAlign", label: c.hAlign, "default": "", items: [63 [d.notSet, ""],64 [d.alignLeft, "left"],65 [d.alignCenter, "center"],66 [d.alignRight, "right"]67 ], setup: function (a) {68 var b = a.getAttribute("align");69 this.setValue(a.getStyle("text-align") || b || "")70 }, commit: function (a) {71 var b = this.getValue();72 b ? a.setStyle("text-align", b) : a.removeStyle("text-align");73 a.removeAttribute("align")74 }},75 {type: "select", id: "vAlign", label: c.vAlign, "default": "", items: [76 [d.notSet, ""],77 [d.alignTop, "top"],78 [d.alignMiddle, "middle"],79 [d.alignBottom,80 "bottom"],81 [c.alignBaseline, "baseline"]82 ], setup: function (a) {83 var b = a.getAttribute("vAlign"), a = a.getStyle("vertical-align");84 switch (a) {85 case "top":86 case "middle":87 case "bottom":88 case "baseline":89 break;90 default:91 a = ""92 }93 this.setValue(a || b || "")94 }, commit: function (a) {95 var b = this.getValue();96 b ? a.setStyle("vertical-align", b) : a.removeStyle("vertical-align");97 a.removeAttribute("vAlign")98 }}99 ]},100 e,101 {type: "vbox", padding: 0, children: [102 {type: "select", id: "cellType", label: c.cellType, "default": "td", items: [103 [c.data, "td"],104 [c.header, "th"]105 ],106 setup: function (a) {107 this.setValue(a.getName())108 }, commit: function (a) {109 a.renameNode(this.getValue())110 }},111 e,112 {type: "text", id: "rowSpan", label: c.rowSpan, "default": "", validate: h.integer(c.invalidRowSpan), setup: function (a) {113 (a = parseInt(a.getAttribute("rowSpan"), 10)) && 1 != a && this.setValue(a)114 }, commit: function (a) {115 var b = parseInt(this.getValue(), 10);116 b && 1 != b ? a.setAttribute("rowSpan", this.getValue()) : a.removeAttribute("rowSpan")117 }},118 {type: "text", id: "colSpan", label: c.colSpan, "default": "", validate: h.integer(c.invalidColSpan),119 setup: function (a) {120 (a = parseInt(a.getAttribute("colSpan"), 10)) && 1 != a && this.setValue(a)121 }, commit: function (a) {122 var b = parseInt(this.getValue(), 10);123 b && 1 != b ? a.setAttribute("colSpan", this.getValue()) : a.removeAttribute("colSpan")124 }},125 e,126 {type: "hbox", padding: 0, widths: ["60%", "40%"], children: [127 {type: "text", id: "bgColor", label: c.bgColor, "default": "", setup: function (a) {128 var b = a.getAttribute("bgColor");129 this.setValue(a.getStyle("background-color") || b)130 }, commit: function (a) {131 this.getValue() ? a.setStyle("background-color", this.getValue()) :132 a.removeStyle("background-color");133 a.removeAttribute("bgColor")134 }},135 i ? {type: "button", id: "bgColorChoose", "class": "colorChooser", label: c.chooseColor, onLoad: function () {136 this.getElement().getParent().setStyle("vertical-align", "bottom")137 }, onClick: function () {138 f.getColorFromDialog(function (a) {139 a && this.getDialog().getContentElement("info", "bgColor").setValue(a);140 this.focus()141 }, this)142 }} : e143 ]},144 e,145 {type: "hbox", padding: 0, widths: ["60%", "40%"], children: [146 {type: "text", id: "borderColor", label: c.borderColor, "default": "", setup: function (a) {147 var b =148 a.getAttribute("borderColor");149 this.setValue(a.getStyle("border-color") || b)150 }, commit: function (a) {151 this.getValue() ? a.setStyle("border-color", this.getValue()) : a.removeStyle("border-color");152 a.removeAttribute("borderColor")153 }},154 i ? {type: "button", id: "borderColorChoose", "class": "colorChooser", label: c.chooseColor, style: (k ? "margin-right" : "margin-left") + ": 10px", onLoad: function () {155 this.getElement().getParent().setStyle("vertical-align", "bottom")156 }, onClick: function () {157 f.getColorFromDialog(function (a) {158 a && this.getDialog().getContentElement("info",159 "borderColor").setValue(a);160 this.focus()161 }, this)162 }} : e163 ]}...

Full Screen

Full Screen

9b76ba26-0695-4eaf-9cd8-dbee7e6771b6.js

Source:9b76ba26-0695-4eaf-9cd8-dbee7e6771b6.js Github

copy

Full Screen

...32 get: function get() {33 return this.getValue("sb");34 },35 set: function set(v) {36 this.setValue("sb", v);37 }38 },39 //大盲40 bb: {41 get: function get() {42 return this.getValue("bb");43 },44 set: function set(v) {45 this.setValue("bb", v);46 }47 },48 //带入记分牌49 enterChip: {50 get: function get() {51 return this.getValue("enterChip");52 },53 set: function set(v) {54 this.setValue("enterChip", v);55 }56 },57 //参与人数58 playerCount: {59 get: function get() {60 return this.getValue("playerCount");61 },62 set: function set(v) {63 this.setValue("playerCount", v);64 }65 },66 //牌局时长67 roomTime: {68 get: function get() {69 return this.getValue("roomTime");70 },71 set: function set(v) {72 this.setValue("roomTime", v);73 }74 },75 //授权76 authorize: {77 get: function get() {78 return this.getValue("authorize");79 },80 set: function set(v) {81 this.setValue("authorize", v);82 }83 },84 //保险开关85 safe: {86 get: function get() {87 return this.getValue("safe");88 },89 set: function set(v) {90 this.setValue("safe", v);91 }92 },93 //Ante94 ante: {95 get: function get() {96 return this.getValue("ante");97 },98 set: function set(v) {99 this.setValue("ante", v);100 }101 },102 //Straddle103 straddle: {104 get: function get() {105 return this.getValue("straddle");106 },107 set: function set(v) {108 this.setValue("straddle", v);109 }110 },111 //深筹模式112 deepMode: {113 get: function get() {114 return this.getValue("deepMode");115 },116 set: function set(v) {117 this.setValue("deepMode", v);118 }119 },120 //Allin 禁音121 allin: {122 get: function get() {123 return this.getValue("allin");124 },125 set: function set(v) {126 this.setValue("allin", v);127 }128 }129 }130});131//比赛局参数(SNG, MTT)132P9RoomData.P9MTTGameData = cc.Class({133 name: "P9MTTGameData",134 "extends": MODEL.FAbstractModel,135 ctor: function ctor() {},136 properties: {137 //单桌人数138 tablePlayerCount: {139 get: function get() {140 return this.getValue("tablePlayerCount");141 },142 set: function set(v) {143 this.setValue("tablePlayerCount", v);144 }145 },146 //速度147 speed: {148 get: function get() {149 return this.getValue("speed");150 },151 set: function set(v) {152 this.setValue("speed", v);153 }154 },155 //授权156 authorize: {157 get: function get() {158 return this.getValue("authorize");159 },160 set: function set(v) {161 this.setValue("authorize", v);162 }163 },164 //延时报名165 delayJoin: {166 get: function get() {167 return this.getValue("delayJoin");168 },169 set: function set(v) {170 this.setValue("delayJoin", v);171 }172 },173 //深筹模式174 deepMode: {175 get: function get() {176 return this.getValue("deepMode");177 },178 set: function set(v) {179 this.setValue("deepMode", v);180 }181 },182 //(MTT专用) 开赛时间183 startTime: {184 get: function get() {185 return this.getValue("startTime");186 },187 set: function set(v) {188 this.setValue("startTime", v);189 }190 },191 //(SNG专用) 参数人数192 maxPlayerCount: {193 get: function get() {194 return this.getValue("maxPlayerCount");195 },196 set: function set(v) {197 this.setValue("maxPlayerCount", v);198 }199 }200 }201});202//──────────────────────────────────────────────────────────...

Full Screen

Full Screen

P9RoomData.js

Source:P9RoomData.js Github

copy

Full Screen

...32 get: function() {33 return this.getValue("sb");34 },35 set: function(v) {36 this.setValue("sb", v);37 }38 },39 //大盲40 bb: {41 get: function() {42 return this.getValue("bb");43 },44 set: function(v) {45 this.setValue("bb", v);46 }47 },48 //带入记分牌49 enterChip: {50 get: function() {51 return this.getValue("enterChip");52 },53 set: function(v) {54 this.setValue("enterChip", v);55 }56 },57 //参与人数58 playerCount: {59 get: function() {60 return this.getValue("playerCount");61 },62 set: function(v) {63 this.setValue("playerCount", v);64 }65 },66 //牌局时长67 roomTime: {68 get: function() {69 return this.getValue("roomTime");70 },71 set: function(v) {72 this.setValue("roomTime", v);73 }74 },75 //授权76 authorize: {77 get: function() {78 return this.getValue("authorize");79 },80 set: function(v) {81 this.setValue("authorize", v);82 }83 },84 //保险开关85 safe: {86 get: function() {87 return this.getValue("safe");88 },89 set: function(v) {90 this.setValue("safe", v);91 }92 },93 //Ante94 ante: {95 get: function() {96 return this.getValue("ante");97 },98 set: function(v) {99 this.setValue("ante", v);100 }101 },102 //Straddle103 straddle: {104 get: function() {105 return this.getValue("straddle");106 },107 set: function(v) {108 this.setValue("straddle", v);109 }110 },111 //深筹模式112 deepMode: {113 get: function() {114 return this.getValue("deepMode");115 },116 set: function(v) {117 this.setValue("deepMode", v);118 }119 },120 //Allin 禁音121 allin: {122 get: function() {123 return this.getValue("allin");124 },125 set: function(v) {126 this.setValue("allin", v);127 }128 }129 }130});131//比赛局参数(SNG, MTT)132P9RoomData.P9MTTGameData = cc.Class({133 name: "P9MTTGameData",134 extends: MODEL.FAbstractModel,135 ctor: function() {136 },137 properties: {138 //单桌人数139 tablePlayerCount: {140 get: function() {141 return this.getValue("tablePlayerCount");142 },143 set: function(v) {144 this.setValue("tablePlayerCount", v);145 }146 },147 //速度148 speed: {149 get: function() {150 return this.getValue("speed");151 },152 set: function(v) {153 this.setValue("speed", v);154 }155 },156 //授权157 authorize: {158 get: function() {159 return this.getValue("authorize");160 },161 set: function(v) {162 this.setValue("authorize", v);163 }164 },165 //延时报名166 delayJoin: {167 get: function() {168 return this.getValue("delayJoin");169 },170 set: function(v) {171 this.setValue("delayJoin", v);172 }173 },174 //深筹模式175 deepMode: {176 get: function() {177 return this.getValue("deepMode");178 },179 set: function(v) {180 this.setValue("deepMode", v);181 }182 },183 //(MTT专用) 开赛时间184 startTime: {185 get: function() {186 return this.getValue("startTime");187 },188 set: function(v) {189 this.setValue("startTime", v);190 }191 },192 //(SNG专用) 参数人数193 maxPlayerCount: {194 get: function() {195 return this.getValue("maxPlayerCount");196 },197 set: function(v) {198 this.setValue("maxPlayerCount", v);199 }200 }201 }202});203//──────────────────────────────────────────────────────────...

Full Screen

Full Screen

onKey.js

Source:onKey.js Github

copy

Full Screen

...30 if (type === 'datetime' && k === ' ' && util.charCount(value, ' ') !== 2) {31 // insert missing space32 this.typedValue = '';33 value = value.replace(' ', '');34 this.setValue(`${value.substring(0, 10)} ${value.substring(10, 15)} ${value.substring(15)}`, true);35 setSelection(11);36 util.stopEvent(e);37 return;38 } else if (value !== this.typedValue) {39 this.setValue(value, true);40 }41 if (util.isArrowKey[k]) {42 // FIXME: test is not adding picker time43 // 12/12/2017 06:30 am'44 const inc = k === 'ArrowUp' ? 1 : -1;45 if (/time/.test(type)) {46 const HR = type === 'time' ? [0,2] : [11,13];47 const MN = type === 'time' ? [3,5] : [14,16];48 if (end >= HR[0] && end <= HR[1]) {49 this.setValue(util.incHours(value, inc), true);50 } else if (end >= MN[0] && end <= MN[1]) {51 this.setValue(util.incMinutes(value, inc, 15), true);52 } else if (type === 'time' || beg > 16) {53 this.setValue(value.replace(/([ap]m)/i, str => /a/i.test(str) ? 'pm' : 'am' ), true);54 }55 }56 if (/date/.test(type)) {57 if (end <= 2 ) {58 this.setValue(util.incMonth(value, inc), true);59 } else if (end < 5) {60 this.setValue(util.incDate(value, inc), true);61 } else if (end < 11) {62 this.setValue(util.incYear(value, inc), true);63 }64 }65 } else if (/[ap]/i.test(k) && /time/.test(type)) {66 this.setValue(this.setAMPM(value, k === 'a' ? 'am' : 'pm'), true);67 }68 setSelection(beg);69 util.stopEvent(e);70 return;71 }72 if (str.length !== end && beg === end) {73 // handle selection or middle-string edit74 let temp = this.typedValue.substring(0, beg) + k + this.typedValue.substring(end + 1);75 const nextCharPos = util.nextNumPos(beg + 1, temp);76 const value = this.setValue(temp, true);77 const nextChar = str.charAt(beg + 1);78 setSelection(/[\s\/:]/.test(nextChar) ? beg + 2 : beg + 1);79 util.stopEvent(e);80 return;81 } else if (end !== beg) {82 // selection replace83 let temp = util.replaceText(this.typedValue, k, beg, end, 'X');84 const value = this.setValue(temp, true);85 setSelection(beg + 1);86 util.stopEvent(e);87 return;88 }89 this.setValue(str + k, true);90}...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var webdriver = require('selenium-webdriver');2var driver = new webdriver.Builder()3 .withCapabilities({4 })5 .build();6 .executeScript(function() {7 return window.wda.setValue('test', 0, 0);8 })9 .then(function() {10 console.log('Success');11 })12 .catch(function(err) {13 console.log('Error: ' + err);14 });15driver.quit();16var webdriver = require('selenium-webdriver');17var driver = new webdriver.Builder()18 .withCapabilities({19 })20 .build();21 .executeScript(function() {22 return window.wda.setValue('test', 0, 0);23 })24 .then(function() {25 console.log('Success');26 })27 .catch(function(err) {28 console.log('Error: ' + err);29 });30driver.quit();31var webdriver = require('selenium-webdriver');32var driver = new webdriver.Builder()33 .withCapabilities({34 })35 .build();36 .executeScript(function() {37 return window.wda.setValue('test', 0, 0);38 })39 .then(function() {

Full Screen

Using AI Code Generation

copy

Full Screen

1const { remote } = require('webdriverio');2(async () => {3 const browser = await remote({4 capabilities: {5 }6 });7 await browser.pause(10000);8 await browser.pause(10000);9 await browser.deleteSession();10})();11const { remote } = require('webdriverio');12(async () => {13 const browser = await remote({14 capabilities: {15 }16 });17 await browser.pause(10000);18 await browser.pause(10000);19 await browser.deleteSession();20})();21const { remote } = require('webdriverio');22(async () => {

Full Screen

Using AI Code Generation

copy

Full Screen

1const {remote} = require('webdriverio');2const opts = {3 capabilities: {4 }5};6(async () => {7 const client = await remote(opts);8 const el = await client.$('~testField');9 await el.setValue('test');10})();11const {remote} = require('webdriverio');12const opts = {13 capabilities: {14 }15};16(async () => {17 const client = await remote(opts);18 const el = await client.$('~testField');19 await el.setValue('test');20})();21const {remote} = require('webdriverio');22const opts = {23 capabilities: {24 }25};26(async () => {27 const client = await remote(opts);28 const el = await client.$('~testField');29 await el.setValue('test');30})();31const {remote} = require('webdriverio');

Full Screen

Using AI Code Generation

copy

Full Screen

1var wd = require('wd');2var asserters = wd.asserters;3var appium = require('appium');4var desiredCaps = {5};6var driver = wd.promiseChainRemote('localhost', 4723);7driver.init(desiredCaps)8 .then(function () {9 return driver.setImplicitWaitTimeout(5000);10 })11 .then(function () {12 return driver.elementByAccessibilityId('Add').click();13 })14 .then(function () {15 return driver.waitForElementByAccessibilityId('Title', 5000);16 })17 .then(function (title) {18 return title.setValue('Test Event');19 })20 .then(function () {21 return driver.elementByAccessibilityId('Save').click();22 })23 .then(function () {24 return driver.waitForElementByAccessibilityId('Test Event', 5000);25 })26 .then(function (event) {27 return event.click();28 })29 .then(function () {30 return driver.waitForElementByAccessibilityId('Delete', 5000);31 })32 .then(function (deleteButton) {33 return deleteButton.click();34 })35 .then(function () {36 return driver.waitForElementByAccessibilityId('Delete', 5000);37 })38 .then(function (deleteButton) {39 return deleteButton.click();40 })41 .fin(function () {42 return driver.quit();43 })44 .done();

Full Screen

Using AI Code Generation

copy

Full Screen

1var webdriverio = require('webdriverio');2var options = {3 desiredCapabilities: {4 }5};6var client = webdriverio.remote(options);7 .init()8 .end()9 .catch(function(err) {10 console.log(err);11 });

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Appium Xcuitest Driver automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Sign up Free
_

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful