123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765 |
- function QuickModifyTopic(oOptions)
- {
- this.opt = oOptions;
- this.aHidePrefixes = this.opt.aHidePrefixes;
- this.iCurTopicId = 0;
- this.sCurMessageId = '';
- this.sBuffSubject = '';
- this.oCurSubjectDiv = null;
- this.oTopicModHandle = document;
- this.bInEditMode = false;
- this.bMouseOnDiv = false;
- this.bXmlHttpCapable = this.isXmlHttpCapable();
- this.init();
- }
- QuickModifyTopic.prototype.isXmlHttpCapable = function ()
- {
- if (typeof(window.XMLHttpRequest) == 'undefined')
- return false;
-
- if ('opera' in window)
- {
- var oTest = new XMLHttpRequest();
- if (!('setRequestHeader' in oTest))
- return false;
- }
- return true;
- }
- QuickModifyTopic.prototype.init = function ()
- {
-
- this.oTopicModHandle.instanceRef = this;
-
- this.oTopicModHandle.onkeydown = function (oEvent) {return this.instanceRef.modify_topic_keypress(oEvent);};
-
- this.oTopicModHandle.onclick = function (oEvent) {return this.instanceRef.modify_topic_click(oEvent);};
- }
- QuickModifyTopic.prototype.modify_topic = function (topic_id, first_msg_id)
- {
-
- if (typeof(cur_session_var) == 'undefined')
- cur_session_var = 'sesc';
-
- if (this.bInEditMode)
- {
-
- if (this.iCurTopicId == topic_id)
- return;
- else
- this.modify_topic_cancel();
- }
- this.bInEditMode = true;
- this.bMouseOnDiv = true;
- this.iCurTopicId = topic_id;
-
- ajax_indicator(true);
- sendXMLDocument.call(this, smf_prepareScriptUrl(smf_scripturl) + "action=quotefast;quote=" + first_msg_id + ";modify;xml", '', this.onDocReceived_modify_topic);
- }
- QuickModifyTopic.prototype.onDocReceived_modify_topic = function (XMLDoc)
- {
-
- if (!XMLDoc || !XMLDoc.getElementsByTagName('message'))
- {
- this.modify_topic_cancel();
- return true;
- }
- this.sCurMessageId = XMLDoc.getElementsByTagName("message")[0].getAttribute("id");
- this.oCurSubjectDiv = document.getElementById('msg_' + this.sCurMessageId.substr(4));
- this.sBuffSubject = getInnerHTML(this.oCurSubjectDiv);
-
- this.set_hidden_topic_areas('none');
-
- ajax_indicator(false);
- this.modify_topic_show_edit(XMLDoc.getElementsByTagName("subject")[0].childNodes[0].nodeValue);
- }
- QuickModifyTopic.prototype.modify_topic_cancel = function ()
- {
- setInnerHTML(this.oCurSubjectDiv, this.sBuffSubject);
- this.set_hidden_topic_areas('');
- this.bInEditMode = false;
- return false;
- }
- QuickModifyTopic.prototype.set_hidden_topic_areas = function (set_style)
- {
- for (var i = 0; i < this.aHidePrefixes.length; i++)
- {
- if (document.getElementById(this.aHidePrefixes[i] + this.sCurMessageId.substr(4)) != null)
- document.getElementById(this.aHidePrefixes[i] + this.sCurMessageId.substr(4)).style.display = set_style;
- }
- }
- QuickModifyTopic.prototype.modify_topic_show_edit = function (subject)
- {
-
- setInnerHTML(this.oCurSubjectDiv, '<input type="text" name="subject" value="' + subject + '" size="60" style="width: 95%;" maxlength="80" class="input_text"><input type="hidden" name="topic" value="' + this.iCurTopicId + '"><input type="hidden" name="msg" value="' + this.sCurMessageId.substr(4) + '">');
-
- this.oCurSubjectDiv.instanceRef = this;
- this.oCurSubjectDiv.onmouseout = function (oEvent) {return this.instanceRef.modify_topic_mouseout(oEvent);};
- this.oCurSubjectDiv.onmouseover = function (oEvent) {return this.instanceRef.modify_topic_mouseover(oEvent);};
- }
- QuickModifyTopic.prototype.modify_topic_save = function (cur_session_id, cur_session_var)
- {
- if (!this.bInEditMode)
- return true;
-
- if (typeof(cur_session_var) == 'undefined')
- cur_session_var = 'sesc';
- var i, x = new Array();
- x[x.length] = 'subject=' + document.forms.quickModForm['subject'].value.replace(/&#/g, "&#").php_to8bit().php_urlencode();
- x[x.length] = 'topic=' + parseInt(document.forms.quickModForm.elements['topic'].value);
- x[x.length] = 'msg=' + parseInt(document.forms.quickModForm.elements['msg'].value);
-
- ajax_indicator(true);
- sendXMLDocument.call(this, smf_prepareScriptUrl(smf_scripturl) + "action=jsmodify;topic=" + parseInt(document.forms.quickModForm.elements['topic'].value) + ";" + cur_session_var + "=" + cur_session_id + ";xml", x.join("&"), this.modify_topic_done);
- return false;
- }
- QuickModifyTopic.prototype.modify_topic_done = function (XMLDoc)
- {
- ajax_indicator(false);
-
- if (!XMLDoc || !XMLDoc.getElementsByTagName('subject'))
- {
- this.modify_topic_cancel();
- return true;
- }
- var message = XMLDoc.getElementsByTagName("smf")[0].getElementsByTagName("message")[0];
- var subject = message.getElementsByTagName("subject")[0];
- var error = message.getElementsByTagName("error")[0];
-
- if (!subject || error)
- return false;
- this.modify_topic_hide_edit(subject.childNodes[0].nodeValue);
- this.set_hidden_topic_areas('');
- this.bInEditMode = false;
-
- if ($.isFunction($.fn.SMFtooltip));
- $('.preview').SMFtooltip().smf_tooltip_off;
- return false;
- }
- QuickModifyTopic.prototype.modify_topic_hide_edit = function (subject)
- {
-
- setInnerHTML(this.oCurSubjectDiv, '<a href="' + smf_scripturl + '?topic=' + this.iCurTopicId + '.0">' + subject + '<' +'/a>');
- }
- QuickModifyTopic.prototype.modify_topic_keypress = function (oEvent)
- {
- if (typeof(oEvent.keyCode) != "undefined" && this.bInEditMode)
- {
- if (oEvent.keyCode == 27)
- {
- this.modify_topic_cancel();
- if (typeof(oEvent.preventDefault) == "undefined")
- oEvent.returnValue = false;
- else
- oEvent.preventDefault();
- }
- else if (oEvent.keyCode == 13)
- {
- this.modify_topic_save(smf_session_id, smf_session_var);
- if (typeof(oEvent.preventDefault) == "undefined")
- oEvent.returnValue = false;
- else
- oEvent.preventDefault();
- }
- }
- }
- QuickModifyTopic.prototype.modify_topic_click = function (oEvent)
- {
- if (this.bInEditMode && !this.bMouseOnDiv)
- this.modify_topic_save(smf_session_id, smf_session_var);
- }
- QuickModifyTopic.prototype.modify_topic_mouseout = function (oEvent)
- {
- this.bMouseOnDiv = false;
- }
- QuickModifyTopic.prototype.modify_topic_mouseover = function (oEvent)
- {
- this.bMouseOnDiv = true;
- }
- function QuickReply(oOptions)
- {
- this.opt = oOptions;
- this.bCollapsed = this.opt.bDefaultCollapsed;
- this.bIsFull = this.opt.bIsFull;
- }
- QuickReply.prototype.quote = function (iMessageId, xDeprecated)
- {
-
- if (typeof(xDeprecated) != 'undefined')
- return true;
- if (this.bCollapsed)
- {
- window.location.href = smf_prepareScriptUrl(this.opt.sScriptUrl) + 'action=post;quote=' + iMessageId + ';topic=' + this.opt.iTopicId + '.' + this.opt.iStart;
- return false;
- }
- else
- {
-
- if (window.XMLHttpRequest)
- {
- ajax_indicator(true);
- if (this.bIsFull)
- insertQuoteFast(iMessageId);
- else
- getXMLDocument(smf_prepareScriptUrl(this.opt.sScriptUrl) + 'action=quotefast;quote=' + iMessageId + ';xml', this.onQuoteReceived);
- }
-
- else
- reqWin(smf_prepareScriptUrl(this.opt.sScriptUrl) + 'action=quotefast;quote=' + iMessageId, 240, 90);
-
- if (navigator.appName == 'Microsoft Internet Explorer')
- window.location.hash = this.opt.sJumpAnchor;
- else
- window.location.hash = '#' + this.opt.sJumpAnchor;
- return false;
- }
- }
- QuickReply.prototype.onQuoteReceived = function (oXMLDoc)
- {
- var sQuoteText = '';
- for (var i = 0; i < oXMLDoc.getElementsByTagName('quote')[0].childNodes.length; i++)
- sQuoteText += oXMLDoc.getElementsByTagName('quote')[0].childNodes[i].nodeValue;
- replaceText(sQuoteText, document.forms.postmodify.message);
- ajax_indicator(false);
- }
- QuickReply.prototype.swap = function ()
- {
- $('#' + this.opt.sImageId).toggleClass(this.opt.sClassCollapsed + ' ' + this.opt.sClassExpanded);
- $('#' + this.opt.sContainerId).slideToggle();
- this.bCollapsed = !this.bCollapsed;
- }
- function QuickModify(oOptions)
- {
- this.opt = oOptions;
- this.bInEditMode = false;
- this.sCurMessageId = '';
- this.oCurMessageDiv = null;
- this.oCurSubjectDiv = null;
- this.sMessageBuffer = '';
- this.sSubjectBuffer = '';
- this.bXmlHttpCapable = this.isXmlHttpCapable();
- this.aAccessKeys = new Array();
-
- if (this.bXmlHttpCapable)
- {
- var aShowQuickModify = document.getElementsByClassName(this.opt.sClassName);
- for (var i = 0, length = aShowQuickModify.length; i < length; i++) {
- aShowQuickModify[i].style.display = "inline";
- }
- }
- }
- QuickModify.prototype.isXmlHttpCapable = function ()
- {
- if (typeof(window.XMLHttpRequest) == 'undefined')
- return false;
-
- if ('opera' in window)
- {
- var oTest = new XMLHttpRequest();
- if (!('setRequestHeader' in oTest))
- return false;
- }
- return true;
- }
- QuickModify.prototype.modifyMsg = function (iMessageId)
- {
- if (!this.bXmlHttpCapable)
- return;
-
- if (typeof(sSessionVar) == 'undefined')
- sSessionVar = 'sesc';
-
- if (typeof(this.opt.sFormRemoveAccessKeys) != 'undefined')
- {
- if (typeof(document.forms[this.opt.sFormRemoveAccessKeys]))
- {
- var aInputs = document.forms[this.opt.sFormRemoveAccessKeys].getElementsByTagName('input');
- for (var i = 0; i < aInputs.length; i++)
- {
- if (aInputs[i].accessKey != '')
- {
- this.aAccessKeys[aInputs[i].name] = aInputs[i].accessKey;
- aInputs[i].accessKey = '';
- }
- }
- }
- }
-
- if (this.bInEditMode)
- this.modifyCancel();
-
- this.bInEditMode = true;
-
- ajax_indicator(true);
- sendXMLDocument.call(this, smf_prepareScriptUrl(smf_scripturl) + 'action=quotefast;quote=' + iMessageId + ';modify;xml', '', this.onMessageReceived);
- }
- QuickModify.prototype.onMessageReceived = function (XMLDoc)
- {
- var sBodyText = '', sSubjectText = '';
-
- ajax_indicator(false);
-
- this.sCurMessageId = XMLDoc.getElementsByTagName('message')[0].getAttribute('id');
-
- if (!document.getElementById(this.sCurMessageId))
- return this.modifyCancel();
-
- for (var i = 0; i < XMLDoc.getElementsByTagName("message")[0].childNodes.length; i++)
- sBodyText += XMLDoc.getElementsByTagName("message")[0].childNodes[i].nodeValue;
- this.oCurMessageDiv = document.getElementById(this.sCurMessageId);
- this.sMessageBuffer = getInnerHTML(this.oCurMessageDiv);
-
- sBodyText = sBodyText.replace(/\$/g, '{&dollarfix;$}');
-
- setInnerHTML(this.oCurMessageDiv, this.opt.sTemplateBodyEdit.replace(/%msg_id%/g, this.sCurMessageId.substr(4)).replace(/%body%/, sBodyText).replace(/\{&dollarfix;\$\}/g, '$'));
-
- this.oCurSubjectDiv = document.getElementById('subject_' + this.sCurMessageId.substr(4));
- this.sSubjectBuffer = getInnerHTML(this.oCurSubjectDiv);
- sSubjectText = XMLDoc.getElementsByTagName('subject')[0].childNodes[0].nodeValue.replace(/\$/g, '{&dollarfix;$}');
- setInnerHTML(this.oCurSubjectDiv, this.opt.sTemplateSubjectEdit.replace(/%subject%/, sSubjectText).replace(/\{&dollarfix;\$\}/g, '$'));
- return true;
- }
- QuickModify.prototype.modifyCancel = function ()
- {
-
- if (this.oCurMessageDiv)
- {
- setInnerHTML(this.oCurMessageDiv, this.sMessageBuffer);
- setInnerHTML(this.oCurSubjectDiv, this.sSubjectBuffer);
- }
-
- this.bInEditMode = false;
-
- if (typeof(this.opt.sFormRemoveAccessKeys) != 'undefined')
- {
- if (typeof(document.forms[this.opt.sFormRemoveAccessKeys]))
- {
- var aInputs = document.forms[this.opt.sFormRemoveAccessKeys].getElementsByTagName('input');
- for (var i = 0; i < aInputs.length; i++)
- {
- if (typeof(this.aAccessKeys[aInputs[i].name]) != 'undefined')
- {
- aInputs[i].name = this.aAccessKeys[aInputs[i].name];
- }
- }
- }
- }
- return false;
- }
- QuickModify.prototype.modifySave = function (sSessionId, sSessionVar)
- {
-
- if (!this.bInEditMode)
- return true;
-
- if (typeof(sSessionVar) == 'undefined')
- sSessionVar = 'sesc';
-
- if (typeof(this.opt.sFormRemoveAccessKeys) != 'undefined')
- {
- if (typeof(document.forms[this.opt.sFormRemoveAccessKeys]))
- {
- var aInputs = document.forms[this.opt.sFormRemoveAccessKeys].getElementsByTagName('input');
- for (var i = 0; i < aInputs.length; i++)
- {
- if (typeof(this.aAccessKeys[aInputs[i].name]) != 'undefined')
- {
- aInputs[i].name = this.aAccessKeys[aInputs[i].name];
- }
- }
- }
- }
- var i, x = new Array();
- x[x.length] = 'subject=' + escape(document.forms.quickModForm['subject'].value.replace(/&#/g, "&#").php_to8bit()).replace(/\+/g, "%2B");
- x[x.length] = 'message=' + escape(document.forms.quickModForm['message'].value.replace(/&#/g, "&#").php_to8bit()).replace(/\+/g, "%2B");
- x[x.length] = 'topic=' + parseInt(document.forms.quickModForm.elements['topic'].value);
- x[x.length] = 'msg=' + parseInt(document.forms.quickModForm.elements['msg'].value);
-
- ajax_indicator(true);
- sendXMLDocument.call(this, smf_prepareScriptUrl(this.opt.sScriptUrl) + "action=jsmodify;topic=" + this.opt.iTopicId + ";" + smf_session_var + "=" + smf_session_id + ";xml", x.join("&"), this.onModifyDone);
- return false;
- }
- QuickModify.prototype.onModifyDone = function (XMLDoc)
- {
-
- ajax_indicator(false);
-
- if (!XMLDoc || !XMLDoc.getElementsByTagName('smf')[0])
- {
-
- if (XMLDoc.childNodes.length > 0 && XMLDoc.firstChild.nodeName == 'parsererror')
- setInnerHTML(document.getElementById('error_box'), XMLDoc.firstChild.textContent);
- else
- this.modifyCancel();
- return;
- }
- var message = XMLDoc.getElementsByTagName('smf')[0].getElementsByTagName('message')[0];
- var body = message.getElementsByTagName('body')[0];
- var error = message.getElementsByTagName('error')[0];
- if (body)
- {
-
- var bodyText = '';
- for (var i = 0; i < body.childNodes.length; i++)
- bodyText += body.childNodes[i].nodeValue;
- this.sMessageBuffer = this.opt.sTemplateBodyNormal.replace(/%body%/, bodyText.replace(/\$/g, '{&dollarfix;$}')).replace(/\{&dollarfix;\$\}/g,'$');
- setInnerHTML(this.oCurMessageDiv, this.sMessageBuffer);
-
- var oSubject = message.getElementsByTagName('subject')[0];
- var sSubjectText = oSubject.childNodes[0].nodeValue.replace(/\$/g, '{&dollarfix;$}');
- this.sSubjectBuffer = this.opt.sTemplateSubjectNormal.replace(/%msg_id%/g, this.sCurMessageId.substr(4)).replace(/%subject%/, sSubjectText).replace(/\{&dollarfix;\$\}/g,'$');
- setInnerHTML(this.oCurSubjectDiv, this.sSubjectBuffer);
-
- if (oSubject.getAttribute('is_first') == '1')
- setInnerHTML(document.getElementById('top_subject'), this.opt.sTemplateTopSubject.replace(/%subject%/, sSubjectText).replace(/\{&dollarfix;\$\}/g, '$'));
-
- if (this.opt.bShowModify)
- setInnerHTML(document.getElementById('modified_' + this.sCurMessageId.substr(4)), message.getElementsByTagName('modified')[0].childNodes[0].nodeValue);
- }
- else if (error)
- {
- setInnerHTML(document.getElementById('error_box'), error.childNodes[0].nodeValue);
- document.forms.quickModForm.message.style.border = error.getAttribute('in_body') == '1' ? this.opt.sErrorBorderStyle : '';
- document.forms.quickModForm.subject.style.border = error.getAttribute('in_subject') == '1' ? this.opt.sErrorBorderStyle : '';
- }
- }
- function InTopicModeration(oOptions)
- {
- this.opt = oOptions;
- this.bButtonsShown = false;
- this.iNumSelected = 0;
-
- if (typeof(this.opt.sSessionVar) == 'undefined')
- this.opt.sSessionVar = 'sesc';
- this.init();
- }
- InTopicModeration.prototype.init = function()
- {
-
- for (var i = 0, n = this.opt.aMessageIds.length; i < n; i++)
- {
-
- var oCheckbox = document.createElement('input');
- oCheckbox.type = 'checkbox';
- oCheckbox.className = 'input_check';
- oCheckbox.name = 'msgs[]';
- oCheckbox.value = this.opt.aMessageIds[i];
- oCheckbox.instanceRef = this;
- oCheckbox.onclick = function () {
- this.instanceRef.handleClick(this);
- }
-
- var oCheckboxContainer = document.getElementById(this.opt.sCheckboxContainerMask + this.opt.aMessageIds[i]);
- oCheckboxContainer.appendChild(oCheckbox);
- oCheckboxContainer.style.display = '';
- }
- }
- InTopicModeration.prototype.handleClick = function(oCheckbox)
- {
- if (!this.bButtonsShown && this.opt.sButtonStripDisplay)
- {
- var oButtonStrip = document.getElementById(this.opt.sButtonStrip);
- var oButtonStripDisplay = document.getElementById(this.opt.sButtonStripDisplay);
-
- if (typeof(oButtonStripDisplay) == 'object' && oButtonStripDisplay != null)
- oButtonStripDisplay.style.display = "";
- else
- {
- var oNewDiv = document.createElement('div');
- var oNewList = document.createElement('ul');
- oNewDiv.id = this.opt.sButtonStripDisplay;
- oNewDiv.className = this.opt.sButtonStripClass ? this.opt.sButtonStripClass : 'buttonlist floatbottom';
- oNewDiv.appendChild(oNewList);
- oButtonStrip.appendChild(oNewDiv);
- }
-
- if (this.opt.bCanRemove)
- smf_addButton(this.opt.sButtonStrip, this.opt.bUseImageButton, {
- sId: this.opt.sSelf + '_remove_button',
- sText: this.opt.sRemoveButtonLabel,
- sImage: this.opt.sRemoveButtonImage,
- sUrl: '#',
- sCustom: ' onclick="return ' + this.opt.sSelf + '.handleSubmit(\'remove\')"'
- });
-
- if (this.opt.bCanRestore)
- smf_addButton(this.opt.sButtonStrip, this.opt.bUseImageButton, {
- sId: this.opt.sSelf + '_restore_button',
- sText: this.opt.sRestoreButtonLabel,
- sImage: this.opt.sRestoreButtonImage,
- sUrl: '#',
- sCustom: ' onclick="return ' + this.opt.sSelf + '.handleSubmit(\'restore\')"'
- });
-
- if (this.opt.bCanSplit)
- smf_addButton(this.opt.sButtonStrip, this.opt.bUseImageButton, {
- sId: this.opt.sSelf + '_split_button',
- sText: this.opt.sSplitButtonLabel,
- sImage: this.opt.sSplitButtonImage,
- sUrl: '#',
- sCustom: ' onclick="return ' + this.opt.sSelf + '.handleSubmit(\'split\')"'
- });
-
- this.bButtonsShown = true;
- }
-
- this.iNumSelected += oCheckbox.checked ? 1 : -1;
-
- if (this.opt.bCanRemove && !this.opt.bUseImageButton)
- {
- setInnerHTML(document.getElementById(this.opt.sSelf + '_remove_button_text'), this.opt.sRemoveButtonLabel + ' [' + this.iNumSelected + ']');
- document.getElementById(this.opt.sSelf + '_remove_button').style.display = this.iNumSelected < 1 ? "none" : "";
- }
- if (this.opt.bCanRestore && !this.opt.bUseImageButton)
- {
- setInnerHTML(document.getElementById(this.opt.sSelf + '_restore_button_text'), this.opt.sRestoreButtonLabel + ' [' + this.iNumSelected + ']');
- document.getElementById(this.opt.sSelf + '_restore_button').style.display = this.iNumSelected < 1 ? "none" : "";
- }
- if (this.opt.bCanSplit && !this.opt.bUseImageButton)
- {
- setInnerHTML(document.getElementById(this.opt.sSelf + '_split_button_text'), this.opt.sSplitButtonLabel + ' [' + this.iNumSelected + ']');
- document.getElementById(this.opt.sSelf + '_split_button').style.display = this.iNumSelected < 1 ? "none" : "";
- }
- if(typeof smf_fixButtonClass == 'function')
- smf_fixButtonClass(this.opt.sButtonStrip);
- }
- InTopicModeration.prototype.handleSubmit = function (sSubmitType)
- {
- var oForm = document.getElementById(this.opt.sFormId);
-
- var oInput = document.createElement('input');
- oInput.type = 'hidden';
- oInput.name = this.opt.sSessionVar;
- oInput.value = this.opt.sSessionId;
- oForm.appendChild(oInput);
- switch (sSubmitType)
- {
- case 'remove':
- if (!confirm(this.opt.sRemoveButtonConfirm))
- return false;
- oForm.action = oForm.action.replace(/;split_selection=1/, '');
- oForm.action = oForm.action.replace(/;restore_selected=1/, '');
- break;
- case 'restore':
- if (!confirm(this.opt.sRestoreButtonConfirm))
- return false;
- oForm.action = oForm.action.replace(/;split_selection=1/, '');
- oForm.action = oForm.action + ';restore_selected=1';
- break;
- case 'split':
- if (!confirm(this.opt.sRestoreButtonConfirm))
- return false;
- oForm.action = oForm.action.replace(/;restore_selected=1/, '');
- oForm.action = oForm.action + ';split_selection=1';
- break;
- default:
- return false;
- break;
- }
- oForm.submit();
- return true;
- }
- function expandThumb(thumbID)
- {
- var img = document.getElementById('thumb_' + thumbID);
- var link = document.getElementById('link_' + thumbID);
-
- var tmp_src = img.src;
- var tmp_height = img.style.height;
- var tmp_width = img.style.width;
-
- img.src = link.href;
- img.style.width = link.style.width;
- img.style.height = link.style.height;
-
- link.href = tmp_src;
- link.style.width = tmp_width;
- link.style.height = tmp_height;
- return false;
- }
- function ignore_toggles(msgids, text)
- {
- for (i = 0; i < msgids.length; i++)
- {
- var msgid = msgids[i];
- new smc_Toggle({
- bToggleEnabled: true,
- bCurrentlyCollapsed: true,
- aSwappableContainers: [
- 'msg_' + msgid + '_extra_info',
- 'msg_' + msgid,
- 'msg_' + msgid + '_footer',
- 'msg_' + msgid + '_quick_mod',
- 'modify_button_' + msgid,
- 'msg_' + msgid + '_signature'
- ],
- aSwapLinks: [
- {
- sId: 'msg_' + msgid + '_ignored_link',
- msgExpanded: '',
- msgCollapsed: text
- }
- ]
- });
- }
- }
- function add_like_popup()
- {
- $(".like_count a").click(function(e) {
- e.preventDefault();
- var title = $(this).parent().text();
- return reqOverlayDiv($(this).prop("href"), title);
- });
- }
|