__________________________________________________________________________________________________________// jquey.mobile.changePage() の Hook.
502549
function applyCustomChangePage() {
            var jqmChangePage = $.mobile.changePage.bind($.mobile);
            function customChangePage(to, options) {
                if (_.isString(to)) {
                    if (options && options.transition) {
                        options.transition = Theme.queryPageTransition(options.transition);
                    }
                }
                jqmChangePage(to, options);
            }
            $.mobile.changePage = customChangePage;
        }
48907
public function changePositionAction()
    {
        $request = $this->getRequest();
        if ($request->isXmlHttpRequest())
        {
            $em = $this->getDoctrine()->getManager();
            $pageRepository = $this->getDoctrine()->getRepository('FulgurioLightCMSBundle:Page');
            $page = $this->getPage($request->request->get('pageId'));
            $parentId = $request->request->get('parentId');
            $position = $request->request->get('position');
            if ($parentId != $page->getParent()->getId())
            {
                $pageRepository->downPagesPosition($parentId, $position);
                $pageRepository->upPagesPosition($page->getParent(), $page->getPosition() + 1);
                $page->setParent($pageRepository->find($parentId));
                $models = $this->container->getParameter('fulgurio_light_cms.models');
                $formHandlerClassName = isset($models[$page->getModel()]['back']['handler']) ? $models[$page->getModel()]['back']['handler'] : '\Fulgurio\LightCMSBundle\Form\Handler\AdminPageHandler';
                $formHandler = new $formHandlerClassName();
                $formHandler->setDoctrine($this->getDoctrine());
                $formHandler->makeFullpath($page);
                $em->persist($page);
                $em->flush();
            }
            else
            {
                if ($position > $page->getPosition())
                {
                    $pageRepository->upPagesPosition($page->getParent(), $page->getPosition() + 1, $position - 1);
                    --$position;
                }
                else
                {
                    $pageRepository->downPagesPosition($page->getParent(), $position, $page->getPosition() - 1);
                }
            }
            $page->setPosition($position);
            $em->persist($page);
            $em->flush();
            $response = new Response(json_encode(array('code' => 42)));
            $response->headers->set('Content-Type', 'application/json');
            return $response;
        }
        throw new AccessDeniedException();
    }
215937
function bindEvents() {
      /* here is the meat and potates */
      $contentDomNode.attr('data-placeholder',options.placeholder);

      if (isIosApp) {
        $contentDomNode.on('touchstart',function() {
          post.dialog('text',{'value':cleanUpData(), 'max':options.chars || null, 'multiline':true}, function(text){
            $contentDomNode.html(text).trigger('input');
            trigger('mobileInput',text);
            if (text.length >= 1) {
              $contentDomNode.attr('data-div-placeholder-content', 'true');
            }
            adaptAndSave();
          });
        });
      } else {
        $contentDomNode.on('paste keypress keydown input',function(e) {
          if (mode && mode.editor === true) {
            if ($contentDomNode[0].textContent && charsCount() >= 1) {
              $contentDomNode.attr('data-div-placeholder-content', 'true');
            } else {
              $contentDomNode.removeAttr('data-div-placeholder-content');
            }
          }

          if (e.type === 'paste') {
            formatPaste();
          }

          if(e.which === 13 && isIE) {
            e.preventDefault();
          }

          //list of functional/control keys that you want to allow always
          var keys = [8, 9, 16, 17, 18, 19, 20, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 144, 145];

          if( $.inArray(e.keyCode, keys) === -1) {
            if (options.chars && charsCount() >= options.chars && !e.metaKey) {
              e.preventDefault();
              e.stopPropagation();
            }
          }

          if(timer) {
            clearTimeout(timer);
          }
          timer = setTimeout(adaptAndSave, 50);

        });
      }
    }
600654
function (bind, callback) {
                var jsonChangeCallback = null;
                // register as listener for the bindings defined for this control:
                if (bind) {
                    jsonChangeCallback = {
                        fn : callback || this._notifyDataChange,
                        scope : this,
                        args : {
                            tplCtxt : this.tplCtxt,
                            animate : bind.animate
                        }
                    };

                    // addListener throws errors
                    try {
                        // normalize recursive
                        bind.recursive = bind.recursive !== false;
                        this.__json.addListener(bind.inside, bind.to, jsonChangeCallback, true, bind.recursive);
                        // save for disposal
                        this._bindings.push({
                            inside : bind.inside,
                            callback : jsonChangeCallback,
                            to : bind.to,
                            recursive : bind.recursive
                        });
                    } catch (e) {
                        this.$logError(this.SECTION_BINDING_ERROR, [bind.inside, bind.to, this.id,
                                this.tplCtxt.tplClasspath]);
                        jsonChangeCallback = null;
                    }
                    return jsonChangeCallback;
                }
            }
153832
function(view){
		// Check if jQuery object is inside view, or is the view object itself
		var $nextView = this.saveView(view);

		// Reset flags
		this.endCurrPage = false;
		this.endNextPage = false;

		// Check if views are different
		// if($nextView == this.$currentView)
			// return false;

		// Restore current view class if already set
		if(this.$currentView)
			this.restoreView(this.$currentView);

		// Set nextView as current, with restored css values
		if($nextView){
			this.restoreView($nextView);
			this.$currentView = $nextView.addClass('pt-page-current');
		}else{
			this.$currentView = null;
		}

		// Reset animate flag
		this.isAnimating = false;

		// Trigger change-page event
		this.trigger('page-change');
		return true;
	}
676584
function (page) {
            var state = this.state;
            if (state.currentPage !== page) {
                // page has changed
                state.currentPage = page;
                this.updateVisiblePages();
                scope.broadcast('pagefocus', {
                    page: state.currentPage,
                    numPages: this.numPages,
                    visiblePages: util.extend([], state.visiblePages),
                    fullyVisiblePages: util.extend([], state.fullyVisiblePages)
                });
            } else {
                // still update visible pages!
                this.updateVisiblePages();
            }
        }
771207
function (position, endLocation, animationInterval) {
			var currentLocation = window.pageYOffset;
			if ( position == endLocation || currentLocation == endLocation || ( (window.innerHeight + currentLocation) >= documentHeight ) ) {
				clearInterval(animationInterval);
				options.callbackAfter( toggle, anchor ); // Run callbacks after animation complete
			}
		}
385976
function (options) {
            settings = Pilotfish('extend', {}, settings, options || {});

            // ### Click actions

            // #### `url_change_no_pointer`
            // Click resulted in url change, but target wasn't a pointer
            if (settings.url_change_no_pointer) {
                Pilotfish('on', window, 'unload', function () {
                    if (wasLastClickPointer() === false && wasLastClickRecent() === true) {
                        broadcast('url_change_no_pointer');
                    }
                });
            }


            // #### `hash_change_no_pointer`
            // Click resulted in hash tag change, but wasn't a pointer
            if (settings.hash_change_no_pointer) {
                Pilotfish('on', 'window:hashchange', function () {
                    if (wasLastClickPointer() === false && wasLastClickRecent() === true) {
                        broadcast('hash_change_no_pointer');
                    }
                });
            }

            // TODO Click resulted in an ajax request, but no status indicator


            // ### Application problems

            // TODO User clicked on something that was a pointer, twice

            // #### `click_js_error`
            // click resulted in a javascript error
            Pilotfish('on', 'js_error', function (evt, data) {
                if (wasLastClickRecent() === true) {
                    broadcast('click_js_error', data);
                }
            });


            // #### `multiple_reload`
            // user has reloaded more than x times
            if (settings.multiple_reload) {
                (function () {
                    var reloadCount = 0, currentPath = Pilotfish('currentPath');
                    for (var i = recentPaths.length - 1; i >= 0; i--) {
                        if (recentPaths[i].path == currentPath && recentPaths[i].navType == 1) {
                            reloadCount++;
                        } else {
                            break;
                        }
                    }
                    if (reloadCount == 3) {
                        broadcast('multiple_reload', {path: currentPath});
                    }
                })();
            }

            // ###  Application confusion

            // TODO user sees the same message twice

            // TODO user hit stop and interrupted a transfer

            // TODO user hit back x times in a row (stuck: the js isn't re-executed on back/reload)

            // TODO slowed_cadence - this page is taking signifigantly longer than previous pages

            // TODO lost_focus

            // TODO user_searched

            // TODO Tap into the accelerometer and watch for a thrown computer :)

            // TODO Watch for smashed keys :)
        }
269326
private void appendVal(Constant val) {
		myPage.setVal(currentPos, val);
		currentPos += Page.size(val);
	}
935785
function onLinksDone(loaded) {
                                if (loaded === 2) {
                                    if (hasLayoutChanged) {
                                        $target.find('[lazo-cmp-name]').remove();
                                        $target.append(html);
                                    } else {
                                        $target.html(html);
                                    }
                                    setTimeout(function () {
                                        LAZO.error.clear();
                                        $target.css({ 'visibility': 'visible'} );
                                        viewManager.attachViews(ctl, function (err, success) {
                                            if (err) {
                                                LAZO.logger.error('[LAZO.navigate] Error attaching views', err);
                                            }

                                            doc.updatePageTags(LAZO.ctl.ctx, function (err) {
                                                if (err) {
                                                    LAZO.logger.error('[LAZO.navigate] Error updating page tags', err);
                                                }

                                                doc.setTitle(LAZO.ctl.ctx._rootCtx.pageTitle);
                                                LAZO.app.trigger('navigate:application:complete', eventData);
                                            });
                                        });
                                    }, 0);
                                }
                            }
1127730
function(site) {
		this._detachListeners();
		this._modelListeners = this._modelListeners || [];

		var editor = this;
		function bindText(widget, modelField) {
			function commitWidgetValue(event) {
				var value = widget.value; //$NON-NLS-0$
				var oldValue = site[modelField];
				site[modelField] = value;
				var isChanged = oldValue !== value;
				editor.setDirty(isChanged || editor.isDirty());
			}
			widget.addEventListener("input", commitWidgetValue); //$NON-NLS-0$
			editor._modelListeners.push({target: widget, type: "input", listener: commitWidgetValue}); //$NON-NLS-0$
		}

		bindText(this.name, messages["Name"]);
		bindText(this.hostHint, messages["HostHint"]);

		var dirtyListener = function(dirtyEvent) {
			editor.setDirty(dirtyEvent.value);
		};
		this.mappings.addEventListener("dirty", dirtyListener); //$NON-NLS-0$
		this._modelListeners.push({target: this.mappings, type: "dirty", listener: dirtyListener}); //$NON-NLS-0$
	}
1363355
function(hook, context){
  var hs = $('#heading-selection');
  hs.on('change', function(){
    var value = $(this).val();
    var intValue = parseInt(value,10);
    if(!_.isNaN(intValue)){
      context.ace.callWithAce(function(ace){
        ace.ace_doInsertHeading(intValue);
      },'insertheading' , true);
      hs.val("dummy");
    }
  })
}
13636
function moveToNextCallback(alreadyNew, valueChanged, section)
        {
            if (!moveDirection)
                return;

            // User just tabbed through without changes.
            if (moveTo && moveTo.parent) {
                moveTo.startEditing(!isEditingName ? moveTo.nameElement : moveTo.valueElement);
                return;
            }

            // User has made a change then tabbed, wiping all the original treeElements.
            // Recalculate the new treeElement for the same property we were going to edit next.
            if (moveTo && !moveTo.parent) {
                var propertyElements = section.propertiesTreeOutline.children;
                if (moveDirection === "forward" && blankInput && !isEditingName)
                    --moveToIndex;
                if (moveToIndex >= propertyElements.length && !this._newProperty)
                    createNewProperty = true;
                else {
                    var treeElement = moveToIndex >= 0 ? propertyElements[moveToIndex] : null;
                    if (treeElement) {
                        var elementToEdit = !isEditingName || isPropertySplitPaste ? treeElement.nameElement : treeElement.valueElement;
                        if (alreadyNew && blankInput)
                            elementToEdit = moveDirection === "forward" ? treeElement.nameElement : treeElement.valueElement;
                        treeElement.startEditing(elementToEdit);
                        return;
                    } else if (!alreadyNew)
                        moveToSelector = true;
                }
            }

            // Create a new attribute in this section (or move to next editable selector if possible).
            if (createNewProperty) {
                if (alreadyNew && !valueChanged && (isEditingName ^ (moveDirection === "backward")))
                    return;

                section.addNewBlankProperty().startEditing();
                return;
            }

            if (abandonNewProperty) {
                moveTo = this._findSibling(moveDirection);
                var sectionToEdit = (moveTo || moveDirection === "backward") ? section : section.nextEditableSibling();
                if (sectionToEdit) {
                    if (sectionToEdit.rule())
                        sectionToEdit.startEditingSelector();
                    else
                        sectionToEdit._moveEditorFromSelector(moveDirection);
                }
                return;
            }

            if (moveToSelector) {
                if (section.rule())
                    section.startEditingSelector();
                else
                    section._moveEditorFromSelector(moveDirection);
            }
        }
701025
function toolbarChanged() {
		var updatedUrl, value, tests,
			field = this,
			params = {};

	// Detect if field is a select menu or a checkbox
		if ( "selectedIndex" in field ) {
			value = field.options[ field.selectedIndex ].value || undefined;
		} else {
			value = field.checked ? ( field.defaultValue || true ) : undefined;
		}

		params[ field.name ] = value;
		updatedUrl = setUrl( params );

	// Check if we can apply the change without a page refresh
		if ( "hidepassed" === field.name && "replaceState" in window.history ) {
			QUnit.urlParams[ field.name ] = value;
			config[ field.name ] = value || false;
			tests = id( "qunit-tests" );
			if ( tests ) {
				toggleClass( tests, "hidepass", value || false );
			}
			window.history.replaceState( null, "", updatedUrl );
		} else {
			window.location = updatedUrl;
		}
	}
456287
function TabHostView(options) {
                var _this = _super.call(this, options) || this;
                _this._tabs = []; // ITabView を格納
                _this._activeTabIndex = 0; // active tab
                _this._flipsnap = null; // flipsnap オブジェクト
                _this._flipEndEventHandler = null; // "fstouchend"
                _this._flipMoveEventHandler = null; // "fstouchmove"
                _this._flipDeltaCache = 0; // "flip 距離のキャッシュ"
                _this._scrollEndEventHandler = null; // tabview "scrollstop"
                _this._scrollMoveEventHandler = null; // tabview "scroll"
                _this._refreshTimerId = null; // refresh() 反映確認用
                // check runtime condition
                if (null == UI.global.Flipsnap) {
                    console.error(TAG + "flipsnap module doesn't load.");
                    return _this;
                }
                _this._settings = $.extend({
                    tabContexts: [],
                    tabMoveHandler: function (delta) { },
                    tabStopHandler: function (newIndex, moved) { }
                }, options);
                // setup event handlers
                _this._flipEndEventHandler = function (event) {
                    var fsEvent = event.originalEvent;
                    _this._flipDeltaCache = 0;
                    _this.onTabChanged(fsEvent.newPoint, fsEvent.moved);
                };
                _this._flipMoveEventHandler = function (event) {
                    var fsEvent = event.originalEvent;
                    _this._flipDeltaCache += fsEvent.delta;
                    // bounce のガード
                    if (!_this._settings.enableBounce && ((-1 === fsEvent.direction && 0 === _this._activeTabIndex && 0 < _this._flipDeltaCache) ||
                        (1 === fsEvent.direction && _this._activeTabIndex === _this._tabs.length - 1 && _this._flipDeltaCache < 0))) {
                        event.preventDefault();
                        _this._flipsnap.moveToPoint(fsEvent.newPoint);
                    }
                    else {
                        _this.onTabMoving(fsEvent.delta);
                        _this._tabs.forEach(function (tabview) {
                            tabview.onTabScrolling(_this._activeTabIndex, fsEvent.delta);
                        });
                        _this.preprocess(_this._activeTabIndex);
                    }
                };
                _this._scrollEndEventHandler = function (event) {
                    _this.onScrollStop();
                };
                _this._scrollMoveEventHandler = function (event) {
                    _this.onScroll();
                };
                // setup tabs
                if (_this._settings.initialWidth) {
                    _this.$el.width(_this._settings.initialWidth);
                }
                if (_this._settings.initialHeight) {
                    _this.$el.height(_this._settings.initialHeight);
                }
                var initialWidth = _this._settings.initialWidth;
                var initialHeight = _this.$el.height();
                var tabContexts = _this._settings.tabContexts.slice();
                if (0 < tabContexts.length) {
                    tabContexts.forEach(function (context) {
                        /* tslint:disable:no-unused-expression */
                        new context.ctor($.extend({
                            initialHeight: initialHeight,
                        }, context.options, { host: _this, delayRegister: false }));
                        /* tslint:enable:no-unused-expression */
                    });
                }
                else {
                    // ITabView インスタンス化要求
                    _this.onTabViewSetupRequest(initialHeight);
                }
                if (_this._settings.initImmediate) {
                    _this.initializeTabViews();
                }
                // Flipsnap
                _this.setFlipsnapCondition($.extend({}, {
                    distance: initialWidth,
                }, _this._settings));
                _this.setActiveTab(_this._activeTabIndex, 0, true);
                return _this;
            }
397640
function pageDomHasChanged(page, ph, callback) {
    var elapsed = 0;
    var waitTimeOver = false;
    var domHasChanged = false;
    var originalDom = '';

    async.waterfall([
        // save the initial dom
        function (callback) {
            getData.takeSnapshot(page, ph, function (error, page, ph, dom) {
                if (error) {
                    callback (error);
                    return;
                }

                originalDom = dom;
                callback();
            });
        },

        // poll the page for changes in the dom or until timeout
        function (callback) {
            async.until(
                // conditions for stopping the poll
                function () {
                    waitTimeOver = elapsed > constants.WAIT_TIMEOUT;
                    return waitTimeOver || domHasChanged;
                },
                function (callback) {
                    // polls the page at an interval
                    setTimeout(function () {
                        elapsed += constants.POLL_INTERVAL;
                        getData.takeSnapshot(page, ph, function (error, page, ph, newDom) {
                            if (error) {
                                callback(error);
                                return;
                            }
                            domHasChanged = helpers.domIsDifferent(originalDom, newDom);
                            callback();
                        });
                    }, constants.POLL_INTERVAL);
                },

                function (error) {
                    if (waitTimeOver) {
                        callback('Timeout while waiting for dom to change');
                        return;
                    }
                    callback(error);
                }
            );
        }
    ], function (error) {
        callback(error, page, ph);
    });
}
843443
function(url) {
      if (!isSupportHistoryAPI && ('' + url).indexOf('#') === 0) {
        changeState(null, url, true);
      } else {
        windowLocation.replace(url);
      }
    }