rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); var finishUp = function() { var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c; }; if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._listeners.fire("onBeforeUndoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.undo(); } catch (e) { SimileAjax.Debug.exception("History: Failed to undo action {" + action.label + "}"); } } SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); finishUp(); }, 0); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._listeners.fire("onBeforeRedoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.perform(); } catch (e) { SimileAjax.Debug.exception("History: Failed to redo action {" + action.label + "}"); } SimileAjax.History._currentIndex++; } SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); finishUp(); }, 0); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; }}; |
|
var finishUp = function() { var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c; }; if (c < SimileAjax.History._currentIndex) { SimileAjax.History._listeners.fire("onBeforeUndoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; | try { var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); var finishUp = function() { var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); var finishUp = function() { var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c; }; if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._listeners.fire("onBeforeUndoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.undo(); } catch (e) { SimileAjax.Debug.exception("History: Failed to undo action {" + action.label + "}"); } } SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); finishUp(); }, 0); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._listeners.fire("onBeforeRedoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.perform(); } catch (e) { SimileAjax.Debug.exception("History: Failed to redo action {" + action.label + "}"); } SimileAjax.History._currentIndex++; } SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); finishUp(); }, 0); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; }}; |
var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.undo(); } catch (e) { SimileAjax.Debug.exception("History: Failed to undo action {" + action.label + "}"); } } SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); finishUp(); }, 0); } else if (c > SimileAjax.History._currentIndex) { SimileAjax.History._listeners.fire("onBeforeRedoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.perform(); } catch (e) { SimileAjax.Debug.exception("History: Failed to redo action {" + action.label + "}"); | SimileAjax.History._iframe.contentWindow.location.search = "?" + c; }; if (c < SimileAjax.History._currentIndex) { SimileAjax.History._listeners.fire("onBeforeUndoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.undo(); } catch (e) { SimileAjax.Debug.exception("History: Failed to undo action {" + action.label + "}"); } | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); var finishUp = function() { var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c; }; if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._listeners.fire("onBeforeUndoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.undo(); } catch (e) { SimileAjax.Debug.exception("History: Failed to undo action {" + action.label + "}"); } } SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); finishUp(); }, 0); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._listeners.fire("onBeforeRedoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.perform(); } catch (e) { SimileAjax.Debug.exception("History: Failed to redo action {" + action.label + "}"); } SimileAjax.History._currentIndex++; } SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); finishUp(); }, 0); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; }}; |
SimileAjax.History._currentIndex++; } SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); finishUp(); }, 0); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; | SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); finishUp(); }, 0); } else if (c > SimileAjax.History._currentIndex) { SimileAjax.History._listeners.fire("onBeforeRedoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.perform(); } catch (e) { SimileAjax.Debug.exception("History: Failed to redo action {" + action.label + "}"); } SimileAjax.History._currentIndex++; } SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); finishUp(); }, 0); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; } } catch (e) { SimileAjax.Debug.log(e); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); var finishUp = function() { var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c; }; if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._listeners.fire("onBeforeUndoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.undo(); } catch (e) { SimileAjax.Debug.exception("History: Failed to undo action {" + action.label + "}"); } } SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); finishUp(); }, 0); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._listeners.fire("onBeforeRedoSeveral", []); window.setTimeout(function() { while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.perform(); } catch (e) { SimileAjax.Debug.exception("History: Failed to redo action {" + action.label + "}"); } SimileAjax.History._currentIndex++; } SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); finishUp(); }, 0); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; }}; |
SimileAjax.History._fire("onBeforeUndoSeveral", []); | SimileAjax.History._listeners.fire("onBeforeUndoSeveral", []); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
SimileAjax.History._fire("onBeforeUndo", [ action ]); | SimileAjax.History._listeners.fire("onBeforeUndo", [ action ]); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
SimileAjax.History._fire("onAfterUndo", [ action, true ]); | SimileAjax.History._listeners.fire("onAfterUndo", [ action, true ]); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
SimileAjax.History._fire("onAfterUndo", [ action, false ]); | SimileAjax.History._listeners.fire("onAfterUndo", [ action, false ]); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
SimileAjax.History._fire("onAfterUndoSeveral", []); | SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
SimileAjax.History._fire("onBeforeRedoSeveral", []); | SimileAjax.History._listeners.fire("onBeforeRedoSeveral", []); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
SimileAjax.History._fire("onBeforeRedo", [ action ]); | SimileAjax.History._listeners.fire("onBeforeRedo", [ action ]); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
SimileAjax.History._fire("onAfterRedo", [ action, true ]); | SimileAjax.History._listeners.fire("onAfterRedo", [ action, true ]); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
SimileAjax.History._fire("onAfterRedo", [ action, false ]); | SimileAjax.History._listeners.fire("onAfterRedo", [ action, false ]); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
SimileAjax.History._fire("onAfterRedoSeveral", []); | SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < SimileAjax.History._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; var title = (index >= 0 && index < SimileAjax.History._actions.length) ? SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[index].label) : SimileAjax.History._plainDocumentTitle; SimileAjax.History._iframe.contentWindow.document.title = title; document.title = title; return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
if (c < this._currentIndex) { | if (c < SimileAjax.History._currentIndex) { | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < this._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { if (SimileAjax.History._actions.length > 0) { SimileAjax.History._iframe.contentDocument.title = SimileAjax.History.formatHistoryEntryTitle( SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex].label); } return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
if (SimileAjax.History._actions.length > 0) { SimileAjax.History._iframe.contentDocument.title = SimileAjax.History.formatHistoryEntryTitle( SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex].label); | var index = SimileAjax.History._currentIndex - SimileAjax.History._baseIndex - 1; if (index >= 0 && index < SimileAjax.History._actions.length) { var actionLabel = SimileAjax.History._actions[index].label; SimileAjax.History._iframe.contentWindow.document.title = SimileAjax.History.formatHistoryEntryTitle(actionLabel); document.title = SimileAjax.History._plainDocumentTitle + " [" + actionLabel + "]"; } else { document.title = SimileAjax.History._plainDocumentTitle; | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < this._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { if (SimileAjax.History._actions.length > 0) { SimileAjax.History._iframe.contentDocument.title = SimileAjax.History.formatHistoryEntryTitle( SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex].label); } return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
var action = SimileAjax.History._actions[this._currentIndex - this._baseIndex]; | var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < this._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[this._currentIndex - this._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { SimileAjax.History._iframe.contentDocument.title = SimileAjax.History.formatHistoryEntryTitle( SimileAjax.History._actions[this._currentIndex - this._baseIndex].label); return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
SimileAjax.History._iframe.contentDocument.title = SimileAjax.History.formatHistoryEntryTitle( SimileAjax.History._actions[this._currentIndex - this._baseIndex].label); | if (SimileAjax.History._actions.length > 0) { SimileAjax.History._iframe.contentDocument.title = SimileAjax.History.formatHistoryEntryTitle( SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex].label); } | SimileAjax.History._handleIFrameOnLoad = function() { /* * This function is invoked when the user herself * navigates backward or forward. We need to adjust * the application's state accordingly. */ var q = SimileAjax.History._iframe.contentWindow.location.search; var c = (q.length == 0) ? 0 : Math.max(0, parseInt(q.substr(1))); if (c < this._currentIndex) { // need to undo SimileAjax.History._fire("onBeforeUndoSeveral", []); while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; SimileAjax.History._fire("onBeforeUndo", [ action ]); try { action.undo(); SimileAjax.History._fire("onAfterUndo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterUndo", [ action, false ]); } } SimileAjax.History._fire("onAfterUndoSeveral", []); } else if (c > SimileAjax.History._currentIndex) { // need to redo SimileAjax.History._fire("onBeforeRedoSeveral", []); while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[this._currentIndex - this._baseIndex]; SimileAjax.History._fire("onBeforeRedo", [ action ]); try { action.perform(); SimileAjax.History._fire("onAfterRedo", [ action, true ]); } catch (e) { SimileAjax.History._fire("onAfterRedo", [ action, false ]); } SimileAjax.History._currentIndex++; } SimileAjax.History._fire("onAfterRedoSeveral", []); } else { SimileAjax.History._iframe.contentDocument.title = SimileAjax.History.formatHistoryEntryTitle( SimileAjax.History._actions[this._currentIndex - this._baseIndex].label); return; } var diff = c - SimileAjax.History._currentIndex; SimileAjax.History._currentIndex += diff; SimileAjax.History._baseIndex += diff; SimileAjax.History._iframe.contentWindow.location.search = "?" + c;}; |
else { alert("HMDE"+reason);} | DWREngine._handleMetaDataError = function(metadata, reason, ex) { if (metadata.errorHandler) { metadata.errorHandler(reason, ex); } else { alert("HMDE"+reason);}}; |
|
DWREngine._handleMetaDataError = function(metadata, reason, ex) { if (metadata.errorHandler) { metadata.errorHandler(reason, ex); | DWREngine._handleMetaDataError = function(handlers, reason, ex) { if (handlers && typeof handlers.errorHandler == "function") { handlers.errorHandler(reason, ex); | DWREngine._handleMetaDataError = function(metadata, reason, ex) { if (metadata.errorHandler) { metadata.errorHandler(reason, ex); } else { DWREngine._handleError(reason, ex); }}; |
else { DWREngine._handleError(reason, ex); } | DWREngine._handleMetaDataError = function(metadata, reason, ex) { if (metadata.errorHandler) { metadata.errorHandler(reason, ex); }}; |
|
if (handlers && typeof handlers.errorHandler == "function") handlers.errorHandler(reason, ex); | if (handlers && typeof handlers.warningHandler == "function") handlers.warningHandler(reason, ex); | DWREngine._handleMetaDataWarning = function(handlers, reason, ex) { if (handlers && typeof handlers.errorHandler == "function") handlers.errorHandler(reason, ex); else DWREngine._handleWarning(reason, ex);}; |
SimileAjax.Debug.exception(e); | SimileAjax.Debug.exception("WindowManager: Error handling mouse down", e); | SimileAjax.WindowManager._handleMouseDown = function(elmt, evt, callback) { try { SimileAjax.WindowManager._draggedElement = elmt; SimileAjax.WindowManager._draggedElementCallback = callback; SimileAjax.WindowManager._lastCoords = { x: evt.clientX, y: evt.clientY }; SimileAjax.WindowManager._draggedElementCallback.onDragStart(); } catch (e) { SimileAjax.Debug.exception(e); SimileAjax.WindowManager._cancelDragging(); }}; |
DWREngine._handleError(ex); | metadata.errorHandler(ex); | DWREngine._handleResponse = function(id, reply) { var metadata = DWREngine._metadatas[id]; // Clear this callback out of the list - we don't need it any more DWREngine._metadatas[id] = null; if (metadata) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { metadata.callback(reply); } catch (ex) { DWREngine._handleError(ex); } }}; |
var metadata = DWREngine._metadatas[id]; DWREngine._metadatas[id] = null; if (metadata) { | var callData = DWREngine._callData[id]; DWREngine._callData[id] = null; if (callData) { | DWREngine._handleResponse = function(id, reply) { // Clear this callback out of the list - we don't need it any more var metadata = DWREngine._metadatas[id]; DWREngine._metadatas[id] = null; if (metadata) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { metadata.callback(reply); } catch (ex) { if (metadata.errorHandler) metadata.errorHandler(ex); } }}; |
metadata.callback(reply); | callData.callback(reply); | DWREngine._handleResponse = function(id, reply) { // Clear this callback out of the list - we don't need it any more var metadata = DWREngine._metadatas[id]; DWREngine._metadatas[id] = null; if (metadata) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { metadata.callback(reply); } catch (ex) { if (metadata.errorHandler) metadata.errorHandler(ex); } }}; |
if (metadata.errorHandler) metadata.errorHandler(ex); | DWREngine._handleMetaDataError(callData, ex); | DWREngine._handleResponse = function(id, reply) { // Clear this callback out of the list - we don't need it any more var metadata = DWREngine._metadatas[id]; DWREngine._metadatas[id] = null; if (metadata) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { metadata.callback(reply); } catch (ex) { if (metadata.errorHandler) metadata.errorHandler(ex); } }}; |
if (metadata) { try { metadata.callback(reply); } catch (ex) { DWREngine._handleError(ex); } | if (metadata) { try { metadata.callback(reply); | DWREngine._handleResponse = function(id, reply) { var metadata = DWREngine._metadatas[id]; // Clear this callback out of the list - we don't need it any more DWREngine._metadatas[id] = null; if (metadata) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { metadata.callback(reply); } catch (ex) { DWREngine._handleError(ex); } }}; |
catch (ex) { DWREngine._handleError(ex); } } | DWREngine._handleResponse = function(id, reply) { var metadata = DWREngine._metadatas[id]; // Clear this callback out of the list - we don't need it any more DWREngine._metadatas[id] = null; if (metadata) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { metadata.callback(reply); } catch (ex) { DWREngine._handleError(ex); } }}; |
|
catch (ex) { if (DWREngine._errorHandler) { DWREngine._errorHandler(ex); } | catch (ex) { DWREngine._handleError(ex); | DWREngine._handleResponse = function(id, reply){ var func = DWREngine._callbacks[id]; // Clear this callback out of the list - we don't need it any more DWREngine._callbacks[id] = null; if (func) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { func(reply); } catch (ex) { if (DWREngine._errorHandler) { DWREngine._errorHandler(ex); } } }}; |
var callData = DWREngine._callData[id]; DWREngine._callData[id] = null; if (callData) { | var handlers = DWREngine._handlersMap[id]; DWREngine._handlersMap[id] = null; if (handlers) { | DWREngine._handleResponse = function(id, reply) { // Clear this callback out of the list - we don't need it any more var callData = DWREngine._callData[id]; DWREngine._callData[id] = null; if (callData) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { if (callData.callback) callData.callback(reply); } catch (ex) { DWREngine._handleMetaDataError(callData, ex); } } // Finalize the call for IFrame transport if (DWREngine._method == DWREngine.IFrame) { var responseBatch = DWREngine._batches[DWREngine._batches.length-1]; // Only finalize after the last call has been handled if (responseBatch.map["c"+(responseBatch.map.callCount-1)+"-id"] == id) { DWREngine._clearUp(responseBatch); } }}; |
if (callData.callback) callData.callback(reply); | if (handlers.callback) handlers.callback(reply); | DWREngine._handleResponse = function(id, reply) { // Clear this callback out of the list - we don't need it any more var callData = DWREngine._callData[id]; DWREngine._callData[id] = null; if (callData) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { if (callData.callback) callData.callback(reply); } catch (ex) { DWREngine._handleMetaDataError(callData, ex); } } // Finalize the call for IFrame transport if (DWREngine._method == DWREngine.IFrame) { var responseBatch = DWREngine._batches[DWREngine._batches.length-1]; // Only finalize after the last call has been handled if (responseBatch.map["c"+(responseBatch.map.callCount-1)+"-id"] == id) { DWREngine._clearUp(responseBatch); } }}; |
DWREngine._handleMetaDataError(callData, ex); | DWREngine._handleMetaDataError(handlers, ex); | DWREngine._handleResponse = function(id, reply) { // Clear this callback out of the list - we don't need it any more var callData = DWREngine._callData[id]; DWREngine._callData[id] = null; if (callData) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { if (callData.callback) callData.callback(reply); } catch (ex) { DWREngine._handleMetaDataError(callData, ex); } } // Finalize the call for IFrame transport if (DWREngine._method == DWREngine.IFrame) { var responseBatch = DWREngine._batches[DWREngine._batches.length-1]; // Only finalize after the last call has been handled if (responseBatch.map["c"+(responseBatch.map.callCount-1)+"-id"] == id) { DWREngine._clearUp(responseBatch); } }}; |
var responseBatch = DWREngine._batches[DWREngine._batches.length - 1]; if (responseBatch.method == DWREngine.IFrame) { if (responseBatch.map["c" + (responseBatch.map.callCount - 1) + "-id"] == id) { DWREngine._clearUp(responseBatch); } } | DWREngine._maybeClearUpIFrame(); | DWREngine._handleResponse = function(id, reply) { // Clear this callback out of the list - we don't need it any more var handlers = DWREngine._handlersMap[id]; DWREngine._handlersMap[id] = null; if (handlers) { // Error handlers inside here indicate an error that is nothing to do // with DWR so we handle them differently. try { if (handlers.callback) handlers.callback(reply); } catch (ex) { DWREngine._handleMetaDataError(handlers, ex); } } // Finalize the call for IFrame transport var responseBatch = DWREngine._batches[DWREngine._batches.length - 1]; if (responseBatch.method == DWREngine.IFrame) { // Only finalize after the last call has been handled if (responseBatch.map["c" + (responseBatch.map.callCount - 1) + "-id"] == id) { DWREngine._clearUp(responseBatch); } }}; |
if (error.message) { DWREngine._handleMetaDataError(handlers, error.message, error); } else { DWREngine._handleMetaDataError(handlers, error); } | if (error.message) DWREngine._handleMetaDataError(handlers, error.message, error); else DWREngine._handleMetaDataError(handlers, error); | DWREngine._handleServerError = function(id, error) { // Clear this callback out of the list - we don't need it any more var handlers = DWREngine._handlersMap[id]; DWREngine._handlersMap[id] = null; if (error.message) { DWREngine._handleMetaDataError(handlers, error.message, error); } else { DWREngine._handleMetaDataError(handlers, error); }}; |
var metadata = DWREngine._metadatas[id]; DWREngine._metadatas[id] = null; if (metadata.errorHandler) { if (error.message) { metadata.errorHandler(error.message, error); } else { metadata.errorHandler(error); } | var callData = DWREngine._callData[id]; DWREngine._callData[id] = null; if (error.message) { DWREngine._handleMetaDataError(callData, error.message, error); } else { DWREngine._handleMetaDataError(callData, error); | DWREngine._handleServerError = function(id, error) { // Clear this callback out of the list - we don't need it any more var metadata = DWREngine._metadatas[id]; DWREngine._metadatas[id] = null; if (metadata.errorHandler) { if (error.message) { metadata.errorHandler(error.message, error); } else { metadata.errorHandler(error); } }}; |
var callData = DWREngine._callData[id]; DWREngine._callData[id] = null; | var handlers = DWREngine._handlersMap[id]; DWREngine._handlersMap[id] = null; | DWREngine._handleServerError = function(id, error) { // Clear this callback out of the list - we don't need it any more var callData = DWREngine._callData[id]; DWREngine._callData[id] = null; if (error.message) { DWREngine._handleMetaDataError(callData, error.message, error); } else { DWREngine._handleMetaDataError(callData, error); }}; |
DWREngine._handleMetaDataError(callData, error.message, error); | DWREngine._handleMetaDataError(handlers, error.message, error); | DWREngine._handleServerError = function(id, error) { // Clear this callback out of the list - we don't need it any more var callData = DWREngine._callData[id]; DWREngine._callData[id] = null; if (error.message) { DWREngine._handleMetaDataError(callData, error.message, error); } else { DWREngine._handleMetaDataError(callData, error); }}; |
DWREngine._handleMetaDataError(callData, error); | DWREngine._handleMetaDataError(handlers, error); | DWREngine._handleServerError = function(id, error) { // Clear this callback out of the list - we don't need it any more var callData = DWREngine._callData[id]; DWREngine._callData[id] = null; if (error.message) { DWREngine._handleMetaDataError(callData, error.message, error); } else { DWREngine._handleMetaDataError(callData, error); }}; |
DWREngine._handleServerError = function(id, reason, batch) { | DWREngine._handleServerError = function(id, error, batch) { | DWREngine._handleServerError = function(id, reason, batch) { if (batch.metadata.errorHandler) { batch.metadata.errorHandler(reason); }}; |
batch.metadata.errorHandler(reason); | if (error.message) { batch.metadata.errorHandler(error.message, error); } else { batch.metadata.errorHandler(error); } | DWREngine._handleServerError = function(id, reason, batch) { if (batch.metadata.errorHandler) { batch.metadata.errorHandler(reason); }}; |
if (error.message) DWREngine._handleMetaDataError(handlers, error.message, error); else DWREngine._handleMetaDataError(handlers, error); | if (!error.message) error.message = "Error without message"; DWREngine._handleMetaDataError(handlers, error.message, error); DWREngine._maybeClearUpIFrame(); | DWREngine._handleServerError = function(id, error) { // Clear this callback out of the list - we don't need it any more var handlers = DWREngine._handlersMap[id]; DWREngine._handlersMap[id] = null; if (error.message) DWREngine._handleMetaDataError(handlers, error.message, error); else DWREngine._handleMetaDataError(handlers, error);}; |
DWREngine._handleWarning = function(batch, ex) { | dwr.engine._handleWarning = function(batch, ex) { | DWREngine._handleWarning = function(batch, ex) { if (typeof ex == "string") ex = { name:"unknown", message:ex }; if (ex.message == null) ex.message = ""; if (ex.name == null) ex.name = "unknown"; if (batch && typeof batch.warningHandler == "function") handlers.warningHandler(ex.message, ex); else if (DWREngine._warningHandler) DWREngine._warningHandler(ex.message, ex);}; |
else if (DWREngine._warningHandler) DWREngine._warningHandler(ex.message, ex); | else if (dwr.engine._warningHandler) dwr.engine._warningHandler(ex.message, ex); | DWREngine._handleWarning = function(batch, ex) { if (typeof ex == "string") ex = { name:"unknown", message:ex }; if (ex.message == null) ex.message = ""; if (ex.name == null) ex.name = "unknown"; if (batch && typeof batch.warningHandler == "function") handlers.warningHandler(ex.message, ex); else if (DWREngine._warningHandler) DWREngine._warningHandler(ex.message, ex);}; |
var defaultReaderItem = this.element("defaultSystemReaderListitem"); | var defaultReaderItem = document.createElementNS(kXULNS, "listitem"); defaultReaderItem.id = "defaultSystemReaderListitem"; defaultReaderItem.className = "listitem-iconic"; | _initFeedReaders: function() { this.updateSelectedApplicationInfo();#ifdef XP_WIN // On Windows, list the system default feed reader if it is // not the last-selected application already try { var systemDefaultReader = this._getSystemDefaultReader(); if (systemDefaultReader) { var defaultSystemReaderFilefield = this.element("defaultSystemReaderFilefield"); defaultSystemReaderFilefield.file = systemDefaultReader; var selectedAppFile = this.element("selectedAppFilefield").file; if (!selectedAppFile || defaultSystemReaderFilefield.file.path != selectedAppFile.path) { var defaultReaderItem = this.element("defaultSystemReaderListitem"); defaultReaderItem.setAttribute("label", defaultSystemReaderFilefield.label); defaultReaderItem.setAttribute("image", defaultSystemReaderFilefield.image); defaultReaderItem.hidden = false; } } } catch(ex) { }#endif // List of web handlers var wccr = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"]. getService(Ci.nsIWebContentConverterService); var handlers = wccr.getContentHandlers(TYPE_MAYBE_FEED, {}); if (handlers.length == 0) return; var ios = Cc["@mozilla.org/network/io-service;1"]. getService(Ci.nsIIOService); var readersList = this.element("readers"); for (var i = 0; i < handlers.length; ++i) { var row = document.createElementNS(kXULNS, "listitem"); row.className = "listitem-iconic"; row.setAttribute("label", handlers[i].name); row.setAttribute("webhandlerurl", handlers[i].uri); var uri = ios.newURI(handlers[i].uri, null, null); row.setAttribute("image", uri.prePath + "/favicon.ico"); readersList.appendChild(row); } }, |
defaultReaderItem.hidden = false; | readersList.appendChild(defaultReaderItem); | _initFeedReaders: function() { this.updateSelectedApplicationInfo();#ifdef XP_WIN // On Windows, list the system default feed reader if it is // not the last-selected application already try { var systemDefaultReader = this._getSystemDefaultReader(); if (systemDefaultReader) { var defaultSystemReaderFilefield = this.element("defaultSystemReaderFilefield"); defaultSystemReaderFilefield.file = systemDefaultReader; var selectedAppFile = this.element("selectedAppFilefield").file; if (!selectedAppFile || defaultSystemReaderFilefield.file.path != selectedAppFile.path) { var defaultReaderItem = this.element("defaultSystemReaderListitem"); defaultReaderItem.setAttribute("label", defaultSystemReaderFilefield.label); defaultReaderItem.setAttribute("image", defaultSystemReaderFilefield.image); defaultReaderItem.hidden = false; } } } catch(ex) { }#endif // List of web handlers var wccr = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"]. getService(Ci.nsIWebContentConverterService); var handlers = wccr.getContentHandlers(TYPE_MAYBE_FEED, {}); if (handlers.length == 0) return; var ios = Cc["@mozilla.org/network/io-service;1"]. getService(Ci.nsIIOService); var readersList = this.element("readers"); for (var i = 0; i < handlers.length; ++i) { var row = document.createElementNS(kXULNS, "listitem"); row.className = "listitem-iconic"; row.setAttribute("label", handlers[i].name); row.setAttribute("webhandlerurl", handlers[i].uri); var uri = ios.newURI(handlers[i].uri, null, null); row.setAttribute("image", uri.prePath + "/favicon.ico"); readersList.appendChild(row); } }, |
var readersList = this.element("readers"); | _initFeedReaders: function() { this.updateSelectedApplicationInfo();#ifdef XP_WIN // On Windows, list the system default feed reader if it is // not the last-selected application already try { var systemDefaultReader = this._getSystemDefaultReader(); if (systemDefaultReader) { var defaultSystemReaderFilefield = this.element("defaultSystemReaderFilefield"); defaultSystemReaderFilefield.file = systemDefaultReader; var selectedAppFile = this.element("selectedAppFilefield").file; if (!selectedAppFile || defaultSystemReaderFilefield.file.path != selectedAppFile.path) { var defaultReaderItem = this.element("defaultSystemReaderListitem"); defaultReaderItem.setAttribute("label", defaultSystemReaderFilefield.label); defaultReaderItem.setAttribute("image", defaultSystemReaderFilefield.image); defaultReaderItem.hidden = false; } } } catch(ex) { }#endif // List of web handlers var wccr = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"]. getService(Ci.nsIWebContentConverterService); var handlers = wccr.getContentHandlers(TYPE_MAYBE_FEED, {}); if (handlers.length == 0) return; var ios = Cc["@mozilla.org/network/io-service;1"]. getService(Ci.nsIIOService); var readersList = this.element("readers"); for (var i = 0; i < handlers.length; ++i) { var row = document.createElementNS(kXULNS, "listitem"); row.className = "listitem-iconic"; row.setAttribute("label", handlers[i].name); row.setAttribute("webhandlerurl", handlers[i].uri); var uri = ios.newURI(handlers[i].uri, null, null); row.setAttribute("image", uri.prePath + "/favicon.ico"); readersList.appendChild(row); } }, |
|
if (req.status == 200) { DWRUtil.setValue(id, req.responseText); } else { alert(req.responseText); } | DWRUtil.setValue(id, req.responseText); | JSCP._insertReceive = function(id, req){ if (req.readyState == 4) { if (req.status) { try { if (req.status == 200) { DWRUtil.setValue(id, req.responseText); } else { alert(req.responseText); } } catch (ex) { alert(ex); } } else { alert("No response from remote server."); } }} |
return (data && data.join) ? true : false; | return (data && data instanceof Array); | dwr.util._isArray = function(data) { return (data && data.join) ? true : false;}; |
return (data && data.toUTCString) ? true : false; | return (data && data instanceof Date); | dwr.util._isDate = function(data) { return (data && data.toUTCString) ? true : false;}; |
if (nodeName == null) | if (ele == null || typeof ele != "object" || ele.nodeName == null) | DWRUtil._isHTMLElement = function(ele, nodeName){ if (nodeName == null) { // If I.E. worked properly we could use: // return typeof ele == "object" && ele instanceof HTMLElement; return ele != null && typeof ele == "object" && ele.nodeName != null; } else { return ele != null && typeof ele == "object" && ele.nodeName != null && ele.nodeName.toLowerCase() == nodeName.toLowerCase(); }}; |
return ele != null && typeof ele == "object" && ele.nodeName != null; | return false; | DWRUtil._isHTMLElement = function(ele, nodeName){ if (nodeName == null) { // If I.E. worked properly we could use: // return typeof ele == "object" && ele instanceof HTMLElement; return ele != null && typeof ele == "object" && ele.nodeName != null; } else { return ele != null && typeof ele == "object" && ele.nodeName != null && ele.nodeName.toLowerCase() == nodeName.toLowerCase(); }}; |
else | if (nodeName != null) | DWRUtil._isHTMLElement = function(ele, nodeName){ if (nodeName == null) { // If I.E. worked properly we could use: // return typeof ele == "object" && ele instanceof HTMLElement; return ele != null && typeof ele == "object" && ele.nodeName != null; } else { return ele != null && typeof ele == "object" && ele.nodeName != null && ele.nodeName.toLowerCase() == nodeName.toLowerCase(); }}; |
return ele != null && typeof ele == "object" && ele.nodeName != null && ele.nodeName.toLowerCase() == nodeName.toLowerCase(); | var test = ele.nodeName.toLowerCase(); if (typeof nodeName == "string") { return test == nodeName.toLowerCase(); } if (DWRUtil._isArray(nodeName)) { var match = false; for (var i = 0; i < nodeName.length && !match; i++) { if (test == nodeName[i].toLowerCase()) { match = true; } } return match; } alert("DWRUtil._isHTMLElement was passed test node name that is neither a string or array of strings"); | DWRUtil._isHTMLElement = function(ele, nodeName){ if (nodeName == null) { // If I.E. worked properly we could use: // return typeof ele == "object" && ele instanceof HTMLElement; return ele != null && typeof ele == "object" && ele.nodeName != null; } else { return ele != null && typeof ele == "object" && ele.nodeName != null && ele.nodeName.toLowerCase() == nodeName.toLowerCase(); }}; |
var lookup; for (var i = 0; i < referto.length; i++) { if (referto[i].data == data) { lookup = referto[i]; break; } | var lookup; for (var i = 0; i < referto.length; i++) { if (referto[i].data == data) { lookup = referto[i]; break; | DWREngine._lookup = function(referto, data, name) { var lookup; for (var i = 0; i < referto.length; i++) { if (referto[i].data == data) { lookup = referto[i]; break; } } if (lookup) { return "reference:" + lookup.name; } referto.push({ data:data, name:name }); return null;}; |
if (lookup) { return "reference:" + lookup.name; } referto.push({ data:data, name:name }); return null; | } if (lookup) { return "reference:" + lookup.name; } referto.push({ data:data, name:name }); return null; | DWREngine._lookup = function(referto, data, name) { var lookup; for (var i = 0; i < referto.length; i++) { if (referto[i].data == data) { lookup = referto[i]; break; } } if (lookup) { return "reference:" + lookup.name; } referto.push({ data:data, name:name }); return null;}; |
DWREngine._lookup = function(referto, data, name) { | dwr.engine._lookup = function(referto, data, name) { | DWREngine._lookup = function(referto, data, name) { var lookup; // Can't use a map: http://getahead.ltd.uk/ajax/javascript-gotchas for (var i = 0; i < referto.length; i++) { if (referto[i].data == data) { lookup = referto[i]; break; } } if (lookup) return "reference:" + lookup.name; referto.push({ data:data, name:name }); return null;}; |
var returnValue; for (var i = 0; i < axarray.length; i++) { try { returnValue = new ActiveXObject(axarray[i]); break; } catch (ex) { } | var returnValue; for (var i = 0; i < axarray.length; i++) { try { returnValue = new ActiveXObject(axarray[i]); break; | DWREngine._newActiveXObject = function(axarray) { var returnValue; for (var i = 0; i < axarray.length; i++) { try { returnValue = new ActiveXObject(axarray[i]); break; } catch (ex) { } } return returnValue;}; |
return returnValue; | catch (ex) { } } return returnValue; | DWREngine._newActiveXObject = function(axarray) { var returnValue; for (var i = 0; i < axarray.length; i++) { try { returnValue = new ActiveXObject(axarray[i]); break; } catch (ex) { } } return returnValue;}; |
DWREngine._newActiveXObject = function(axarray) { | dwr.engine._newActiveXObject = function(axarray) { | DWREngine._newActiveXObject = function(axarray) { var returnValue; for (var i = 0; i < axarray.length; i++) { try { returnValue = new ActiveXObject(axarray[i]); break; } catch (ex) { /* ignore */ } } return returnValue;}; |
SimileAjax.Debug.exception(e); | SimileAjax.Debug.exception("WindowManager: Error handling mouse move", e); | SimileAjax.WindowManager._onBodyMouseMove = function(elmt, evt, target) { if (SimileAjax.WindowManager._draggedElement != null) { try { var lastCoords = SimileAjax.WindowManager._lastCoords; var diffX = evt.clientX - lastCoords.x; var diffY = evt.clientY - lastCoords.y; SimileAjax.WindowManager._lastCoords = { x: evt.clientX, y: evt.clientY }; SimileAjax.WindowManager._draggedElementCallback.onDragBy(diffX, diffY); } catch (e) { SimileAjax.Debug.exception(e); SimileAjax.WindowManager._cancelDragging(); } }}; |
lastCoords = { x: evt.clientX, y: evt.clientY }; | SimileAjax.WindowManager._lastCoords = { x: evt.clientX, y: evt.clientY }; | SimileAjax.WindowManager._onBodyMouseMove = function(elmt, evt, target) { if (SimileAjax.WindowManager._draggedElement != null) { try { var lastCoords = SimileAjax.WindowManager._lastCoords; var diffX = evt.clientX - lastCoords.x; var diffY = evt.clientY - lastCoords.y; lastCoords = { x: evt.clientX, y: evt.clientY }; SimileAjax.WindowManager._draggedElementCallback.onDragBy(diffX, diffY); } catch (e) { SimileAjax.Debug.exception(e); SimileAjax.WindowManager._cancelDragging(); } }}; |
var app = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo) .QueryInterface(Components.interfaces.nsIXULRuntime); if (app.inSafeMode) { var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); ww.openWindow(null, "chrome: "_blank", "chrome,centerscreen,modal,resizable=no", null); } | _onProfileStartup: function() { this.Sanitizer.onStartup(); }, |
|
try { var mustDisplayEULA = true; var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); var EULAVersion = prefService.getIntPref("browser.EULA.version"); mustDisplayEULA = !prefService.getBoolPref("browser.EULA." + EULAVersion + ".accepted"); } catch(ex) { } if (mustDisplayEULA) { var ww2 = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); ww2.openWindow(null, "chrome: "_blank", "chrome,centerscreen,modal,resizable=yes", null); } | _onProfileStartup: function() { this.Sanitizer.onStartup(); // check if we're in safe mode var app = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo) .QueryInterface(Components.interfaces.nsIXULRuntime); if (app.inSafeMode) { var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); ww.openWindow(null, "chrome://browser/content/safeMode.xul", "_blank", "chrome,centerscreen,modal,resizable=no", null); } }, |
|
SimileAjax.Debug.exception(e); | SimileAjax.Debug.exception("XmlHttp: Error handling onReadyStateChange", e); | SimileAjax.XmlHttp._onReadyStateChange = function(xmlhttp, fError, fDone) { switch (xmlhttp.readyState) { // 1: Request not yet made // 2: Contact established with server but nothing downloaded yet // 3: Called multiple while downloading in progress // Download complete case 4: try { if (xmlhttp.status == 0 // file:// urls, works on Firefox || xmlhttp.status == 200 // http:// urls ) { if (fDone) { fDone(xmlhttp); } } else { if (fError) { fError( xmlhttp.statusText, xmlhttp.status, xmlhttp ); } } } catch (e) { SimileAjax.Debug.exception(e); } break; }}; |
this._fault = createInstance(XMLRPCFAULT_PROGID, | this._fault = createInstance(XMLRPCFAULT_CONTRACTID, | _parseResponse: function(stream, length) { debug('Creating parser ... '); var parser = new SimpleXMLParser(stream, length); parser.setDocumentHandler(this); // Make sure state is clean this._valueStack = []; this._currValue = null; this._cdata = null; this._foundFault = false; debug('Cranking up the parser'); parser.parse(length); if (this._foundFault) { try { this._fault = createInstance(XMLRPCFAULT_PROGID, 'nsIXmlRpcFault'); this._fault.init(this._result.getValue('faultCode').data, this._result.getValue('faultString').data); this._result = null; } catch(e) { this._fault = null; this._result = null; throw Components.Exception('Could not parse response'); } } }, |
headers:{}, | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':'poll', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // IE can't handle XHR polling, so we must back off to iframe if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
|
var callId = DWREngine._lastCallId++; | var callId = DWREngine._nextCallId++; | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var callId = DWREngine._lastCallId++; // Create a batch object that describes how we are to call the server var batch = { map:{ id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, completed:false, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives batch.callIds[callId] = { callback:function(pause) { DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; if (batch.map.partialResponse == "true") { DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); }}; |
rpcType:DWREngine._pollType, completed:false, isPoll:true, httpMethod:"POST", | rpcType:DWREngine._pollType, isPoll:true, httpMethod:"POST", | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var callId = DWREngine._lastCallId++; // Create a batch object that describes how we are to call the server var batch = { map:{ id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, completed:false, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives batch.callIds[callId] = { callback:function(pause) { DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; if (batch.map.partialResponse == "true") { DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); }}; |
DWREngine._batches[DWREngine._batches.length] = batch; | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var callId = DWREngine._lastCallId++; // Create a batch object that describes how we are to call the server var batch = { map:{ id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, completed:false, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives batch.callIds[callId] = { callback:function(pause) { DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; if (batch.map.partialResponse == "true") { DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); }}; |
|
httpSessionId:jSessionId, | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { map:{ id:id, callCount:1, scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, completed:false, isPoll:true, httpMethod:"POST", async:true, headers:{}, ids:[ id ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:function(pause) { setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; if (batch.map.partialResponse == "true") { DWREngine._checkCometPoll(); }}; |
|
if (!DWREngine._reverseAjax) { return; } | if (!DWREngine._reverseAjax) return; | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':'poll', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, headers:{}, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // IE can't handle XHR polling, so we must back off to iframe if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
completed:false, | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':'poll', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, headers:{}, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // IE can't handle XHR polling, so we must back off to iframe if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
|
callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':'poll', 'c0-id':id, | id:id, | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':'poll', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, headers:{}, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // IE can't handle XHR polling, so we must back off to iframe if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, headers:{}, paramCount:0, ids:[ id ], | method:DWREngine._pollMethod, completed:false, isPoll:true, verb:"POST", async:true, headers:{}, ids:[ id ], paramCount:0, | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':'poll', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, headers:{}, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // IE can't handle XHR polling, so we must back off to iframe if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 | preHooks:[], postHooks:[], timeout:0 | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':'poll', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, headers:{}, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // IE can't handle XHR polling, so we must back off to iframe if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; | if (window.XMLHttpRequest != null) { batch.map.partialResponse = "true"; } else { batch.map.partialResponse = "false"; | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':'poll', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, headers:{}, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // IE can't handle XHR polling, so we must back off to iframe if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
callback:DWREngine._triggerNextPoll | callback:function(pause) { setTimeout("DWREngine._poll()", pause); } | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':'poll', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, headers:{}, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // IE can't handle XHR polling, so we must back off to iframe if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
DWREngine._checkCometPoll(); | if (batch.map.partialResponse == "true") { DWREngine._checkCometPoll(); } | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':'poll', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, headers:{}, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // IE can't handle XHR polling, so we must back off to iframe if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
'c0-methodName':(DWREngine._pollMethod == DWREngine.IFrame) ? 'pollWithIframe' : 'pollWithXhr', | 'c0-methodName':'poll', | DWREngine._poll = function(overridePath) { if (!DWREngine._pollServer) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':(DWREngine._pollMethod == DWREngine.IFrame) ? 'pollWithIframe' : 'pollWithXhr', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
if (!window.XMLHttpRequest && DWREngine._pollMethod == DWREngine.XMLHttpRequest) { batch.method = DWREngine.IFrame; } | DWREngine._poll = function(overridePath) { if (!DWREngine._pollServer) { return; } // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { completed:false, map:{ callCount:1, 'c0-scriptName':'DWRSystem', 'c0-methodName':(DWREngine._pollMethod == DWREngine.IFrame) ? 'pollWithIframe' : 'pollWithXhr', 'c0-id':id, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, method:DWREngine._pollMethod, isPoll:true, verb:"POST", async:true, paramCount:0, ids:[ id ], path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:(DWREngine._preHook) ? [ DWREngine._preHook ] : [], postHooks:(DWREngine._postHook) ? [ DWREngine._postHook ] : [], timeout:0 }; // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:DWREngine._triggerNextPoll }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; DWREngine._checkCometPoll();}; |
|
httpSessionId:jSessionId, | httpSessionId:DWREngine._getJSessionId(), | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { map:{ id:id, callCount:1, httpSessionId:jSessionId, scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, completed:false, isPoll:true, httpMethod:"POST", async:true, headers:{}, ids:[ id ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:function(pause) { setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; if (batch.map.partialResponse == "true") { DWREngine._checkCometPoll(); }}; |
DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; var callId = DWREngine._nextCallId++; | dwr.engine._poll = function(overridePath) { if (!dwr.engine._reverseAjax) return; | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var callId = DWREngine._nextCallId++; // Create a batch object that describes how we are to call the server var batch = { map:{ id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives batch.callIds[callId] = { callback:function(pause) { DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); if (batch.map.partialResponse == "true") { DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); }}; |
id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname | id:0, callCount:1, page:window.location.pathname, httpSessionId:dwr.engine._getJSessionId(), scriptSessionId:dwr.engine._getScriptSessionId() | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var callId = DWREngine._nextCallId++; // Create a batch object that describes how we are to call the server var batch = { map:{ id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives batch.callIds[callId] = { callback:function(pause) { DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); if (batch.map.partialResponse == "true") { DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); }}; |
rpcType:DWREngine._pollType, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 | rpcType:dwr.engine._pollType, isPoll:true, httpMethod:"POST", async:true, headers:{}, handlers:{}, preHooks:[], postHooks:[], path:(overridePath) ? overridePath : dwr.engine._defaultPath, paramCount:0, timeout:0 | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var callId = DWREngine._nextCallId++; // Create a batch object that describes how we are to call the server var batch = { map:{ id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives batch.callIds[callId] = { callback:function(pause) { DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); if (batch.map.partialResponse == "true") { DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); }}; |
batch.callIds[callId] = { | batch.handlers[0] = { | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var callId = DWREngine._nextCallId++; // Create a batch object that describes how we are to call the server var batch = { map:{ id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives batch.callIds[callId] = { callback:function(pause) { DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); if (batch.map.partialResponse == "true") { DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); }}; |
DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); | dwr.engine._cometBatch = null; setTimeout("dwr.engine._poll()", pause); | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var callId = DWREngine._nextCallId++; // Create a batch object that describes how we are to call the server var batch = { map:{ id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives batch.callIds[callId] = { callback:function(pause) { DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); if (batch.map.partialResponse == "true") { DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); }}; |
DWREngine._sendData(batch); | dwr.engine._sendData(batch); | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var callId = DWREngine._nextCallId++; // Create a batch object that describes how we are to call the server var batch = { map:{ id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives batch.callIds[callId] = { callback:function(pause) { DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); if (batch.map.partialResponse == "true") { DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); }}; |
DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); | dwr.engine._cometBatch = batch; dwr.engine._checkCometPoll(); | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var callId = DWREngine._nextCallId++; // Create a batch object that describes how we are to call the server var batch = { map:{ id:callId, callCount:1, httpSessionId:DWREngine._getJSessionId(), scriptSessionId:DWREngine._getScriptSessionId(), page:window.location.pathname }, rpcType:DWREngine._pollType, isPoll:true, httpMethod:"POST", async:true, headers:{}, callIds:[ callId ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives batch.callIds[callId] = { callback:function(pause) { DWREngine._cometBatch = null; setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); if (batch.map.partialResponse == "true") { DWREngine._cometBatch = batch; DWREngine._checkCometPoll(); }}; |
httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, | scriptSessionId:DWREngine._getScriptSessionId(), | DWREngine._poll = function(overridePath) { if (!DWREngine._reverseAjax) return; // Get a unique ID for this call var random = Math.floor(Math.random() * 10001); var id = (random + "_" + new Date().getTime()).toString(); // Create a batch object that describes how we are to call the server var batch = { map:{ id:id, callCount:1, httpSessionId:DWREngine._httpSessionId, scriptSessionId:DWREngine._scriptSessionId, page:window.location.pathname }, rpcType:DWREngine._pollType, completed:false, isPoll:true, httpMethod:"POST", async:true, headers:{}, ids:[ id ], paramCount:0, path:(overridePath) ? overridePath : DWREngine._defaultPath, preHooks:[], postHooks:[], timeout:0 }; if (window.XMLHttpRequest != null) { // Mozilla case where XHR.responseText filled as call proceeds batch.map.partialResponse = "true"; } else { // The IE case where XHR.responseText is not filled until call is closed batch.map.partialResponse = "false"; } // Create an entry in the handlers map for what happens when the reply arrives DWREngine._handlersMap[id] = { errorHandler:DWREngine._errorHandler, warningHandler:DWREngine._warningHandler, callback:function(pause) { setTimeout("DWREngine._poll()", pause); } }; // Send the data DWREngine._sendData(batch); DWREngine._batches[DWREngine._batches.length] = batch; if (batch.map.partialResponse == "true") { DWREngine._checkCometPoll(); }}; |
if (dwr.engine._pollCometSize != response.length) { var firstStartTag = response.indexOf(" if (firstStartTag == -1) { dwr.engine._pollCometSize = response.length; | if (dwr.engine._cometProcessed != response.length) { if (response.length == 0) { dwr.engine._cometProcessed = 0; | dwr.engine._processCometResponse = function(response) { // See CVS history for extra debug lines to help sort problems with this code if (dwr.engine._pollCometSize != response.length) { var firstStartTag = response.indexOf("//#DWR-START#", dwr.engine._pollCometSize); if (firstStartTag == -1) { //dwr.engine._debug("No start tag. '" + response + "'. Searching next time from: " + response.length); dwr.engine._pollCometSize = response.length; } else { var lastEndTag = response.lastIndexOf("//#DWR-END#"); if (lastEndTag != -1) { dwr.engine._remoteEval(response.substring(firstStartTag + 13, lastEndTag)); // Skip the end tag too for next time dwr.engine._pollCometSize = lastEndTag + 11; } else { //dwr.engine._debug("No end tag. (yet) '" + response + "'"); } } }}; |
var lastEndTag = response.lastIndexOf(" if (lastEndTag != -1) { dwr.engine._remoteEval(response.substring(firstStartTag + 13, lastEndTag)); dwr.engine._pollCometSize = lastEndTag + 11; | var firstStartTag = response.indexOf(" if (firstStartTag == -1) { dwr.engine._cometProcessed = response.length; | dwr.engine._processCometResponse = function(response) { // See CVS history for extra debug lines to help sort problems with this code if (dwr.engine._pollCometSize != response.length) { var firstStartTag = response.indexOf("//#DWR-START#", dwr.engine._pollCometSize); if (firstStartTag == -1) { //dwr.engine._debug("No start tag. '" + response + "'. Searching next time from: " + response.length); dwr.engine._pollCometSize = response.length; } else { var lastEndTag = response.lastIndexOf("//#DWR-END#"); if (lastEndTag != -1) { dwr.engine._remoteEval(response.substring(firstStartTag + 13, lastEndTag)); // Skip the end tag too for next time dwr.engine._pollCometSize = lastEndTag + 11; } else { //dwr.engine._debug("No end tag. (yet) '" + response + "'"); } } }}; |
var lastEndTag = response.lastIndexOf(" if (lastEndTag != -1) { dwr.engine._remoteEval(response.substring(firstStartTag + 13, lastEndTag)); if (response.charCodeAt(lastEndTag + 11) == 13 && response.charCodeAt(lastEndTag + 12) == 10) { dwr.engine._cometProcessed = lastEndTag + 13; } else { dwr.engine._cometProcessed = lastEndTag + 11; } } else { } | dwr.engine._processCometResponse = function(response) { // See CVS history for extra debug lines to help sort problems with this code if (dwr.engine._pollCometSize != response.length) { var firstStartTag = response.indexOf("//#DWR-START#", dwr.engine._pollCometSize); if (firstStartTag == -1) { //dwr.engine._debug("No start tag. '" + response + "'. Searching next time from: " + response.length); dwr.engine._pollCometSize = response.length; } else { var lastEndTag = response.lastIndexOf("//#DWR-END#"); if (lastEndTag != -1) { dwr.engine._remoteEval(response.substring(firstStartTag + 13, lastEndTag)); // Skip the end tag too for next time dwr.engine._pollCometSize = lastEndTag + 11; } else { //dwr.engine._debug("No end tag. (yet) '" + response + "'"); } } }}; |
|
} | }; | DWREngine._processCometResponse = function(response) { if (DWREngine._pollCometSize != response.length) { var firstStartTag = response.indexOf("//#DWR-START#", DWREngine._pollCometSize); if (firstStartTag == -1) { // There is no start tag so we ignore the rest // DWRUtil.debug("Missing //#DWR-START# Skipping: " + response.substring(DWREngine._pollCometSize)); DWREngine._pollCometSize = response.length; } else { // if (firstStartTag != DWREngine._pollCometSize) { // DWRUtil.debug("//#DWR-START# not at start skipping: " + response.substring(DWREngine._pollCometSize, firstStartTag)); // } var lastEndTag = response.lastIndexOf("//#DWR-END#"); if (lastEndTag != -1) { var executeString = response.substring(firstStartTag + 13, lastEndTag); // DWRUtil.debug(executeString); eval(executeString); // Skip the end tag too for next time DWREngine._pollCometSize = lastEndTag + 11; } // else { // DWRUtil.debug("Missing //#DWR-END# Postponing: " + executeString); // } } }} |
DWREngine._processCometResponse = function(response) { | dwr.engine._processCometResponse = function(response) { | DWREngine._processCometResponse = function(response) { // See CVS history for extra debug lines to help sort problems with this code if (DWREngine._pollCometSize != response.length) { var firstStartTag = response.indexOf("//#DWR-START#", DWREngine._pollCometSize); if (firstStartTag == -1) { // There is no start tag so we ignore the rest DWREngine._pollCometSize = response.length; } else { var lastEndTag = response.lastIndexOf("//#DWR-END#"); if (lastEndTag != -1) { var executeString = response.substring(firstStartTag + 13, lastEndTag); eval(executeString); // Skip the end tag too for next time DWREngine._pollCometSize = lastEndTag + 11; } } }}; |
if (DWREngine._pollCometSize != response.length) { var firstStartTag = response.indexOf(" | if (dwr.engine._pollCometSize != response.length) { var firstStartTag = response.indexOf(" | DWREngine._processCometResponse = function(response) { // See CVS history for extra debug lines to help sort problems with this code if (DWREngine._pollCometSize != response.length) { var firstStartTag = response.indexOf("//#DWR-START#", DWREngine._pollCometSize); if (firstStartTag == -1) { // There is no start tag so we ignore the rest DWREngine._pollCometSize = response.length; } else { var lastEndTag = response.lastIndexOf("//#DWR-END#"); if (lastEndTag != -1) { var executeString = response.substring(firstStartTag + 13, lastEndTag); eval(executeString); // Skip the end tag too for next time DWREngine._pollCometSize = lastEndTag + 11; } } }}; |
DWREngine._pollCometSize = response.length; | dwr.engine._pollCometSize = response.length; | DWREngine._processCometResponse = function(response) { // See CVS history for extra debug lines to help sort problems with this code if (DWREngine._pollCometSize != response.length) { var firstStartTag = response.indexOf("//#DWR-START#", DWREngine._pollCometSize); if (firstStartTag == -1) { // There is no start tag so we ignore the rest DWREngine._pollCometSize = response.length; } else { var lastEndTag = response.lastIndexOf("//#DWR-END#"); if (lastEndTag != -1) { var executeString = response.substring(firstStartTag + 13, lastEndTag); eval(executeString); // Skip the end tag too for next time DWREngine._pollCometSize = lastEndTag + 11; } } }}; |
DWREngine._pollCometSize = lastEndTag + 11; | dwr.engine._pollCometSize = lastEndTag + 11; } else { | DWREngine._processCometResponse = function(response) { // See CVS history for extra debug lines to help sort problems with this code if (DWREngine._pollCometSize != response.length) { var firstStartTag = response.indexOf("//#DWR-START#", DWREngine._pollCometSize); if (firstStartTag == -1) { // There is no start tag so we ignore the rest DWREngine._pollCometSize = response.length; } else { var lastEndTag = response.lastIndexOf("//#DWR-END#"); if (lastEndTag != -1) { var executeString = response.substring(firstStartTag + 13, lastEndTag); eval(executeString); // Skip the end tag too for next time DWREngine._pollCometSize = lastEndTag + 11; } } }}; |
var uri = branch.getCharPref("uri"); var title = branch.getCharPref("title"); | var uri = branch.getComplexValue("uri", Ci.nsIPrefLocalizedString).data; var title = branch.getComplexValue("title", Ci.nsIPrefLocalizedString).data; | _registerContentHandlerWithBranch: function(branch) { try { var type = branch.getCharPref("type"); var uri = branch.getCharPref("uri"); var title = branch.getCharPref("title"); this._registerContentHandler(type, uri, title); } catch (e) { return false; } return true; }, |
DWREngine._remoteBeginIFrameResponse = function(element, batchId) { DWREngine._receivedBatch = element.batch; | dwr.engine._remoteBeginIFrameResponse = function(element, batchId) { dwr.engine._receivedBatch = element.batch; | DWREngine._remoteBeginIFrameResponse = function(element, batchId) { DWREngine._receivedBatch = element.batch; element.batch = null;}; |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.