• Авторизация


Без заголовка 08-10-2010 13:10 к комментариям - к полной версии - понравилось!


<\/textarea><\/td>\n        <\/tr>\n      <\/table>\n    <\/td>\n  <\/tr><\/table>\n<\/div>\n<div id=\"participate_not_enough\">\n  Недостаточно средств на счёте. <a href=\"payments.php?act=addfunds\" target=\"_blank\">Пополнить баланс »<\/a>\n<\/div>\n<\/div>","script":"winBoxes.participate.removeButtons().addButton({label: global_cancel, style: 'button_no', onClick: winBoxes.participate.hide});\nwinBoxes.participate.addButton({label: 'Отправить', onClick: function() {\n  var amount = getParticipateAmount();\n  var comment = trim(ge('participate_comment').value);\n  if (!amount && !comment.length) {\n    focusAtEnd('participate_amount');\n    return;\n  }\n  hide('participate_msg');\n  ge('participate_not_enough').style.visibility = 'hidden';\n  show('participate_progress');\n  Ajax.postWithCaptcha('gifts.php', {\n    act: 'a_participate',\n    wish: '2270009_2687893',\n    hash: 'd84e2ac5abd0d280f2',\n    test: '0',\n    amount: amount,\n    privacy: ge('wish_privacy_value').value,\n    comment: comment\n  }, {onSuccess: function(obj, text) {\n    var response = eval('(' + text + ')');\n    if (response.callback_id) {\n      var onDone = arguments.callee;\n      setTimeout(function() {\n        (new Ajax(onDone)).post('gifts.php', {act: 'a_participate', callback_id: response.callback_id, test: '0'});\n      }, 1000);\n    } else {\n      hide('participate_progress');\n      show('participate_add_msg');\n      if (response.result) {\n        winBoxes.participate.hide();\n        if (\/\\\/gifts\\.php\/i.test(location.toString())) {\n          getPage({act: 'wish', wish: '2270009_2687893'});\n        } else {\n          document.location = base_domain + 'gifts.php?act=wish&wish=2270009_2687893' + (0 ? '&test=0' : '');\n        }\n      } else if (response.nomoney) {\n        ge('participate_not_enough').style.visibility = 'visible';\n      } else if (response.error) {\n        ge('participate').innerHTML = '<div class=\"error\" style=\"font-size: 11px; font-weight: bold; margin: 0px;\">' + response.error + '<\/div>';\n        winBoxes.participate.removeButtons().addButton({label: 'Закрыть', onClick: winBoxes.participate.hide}).show();\n      }\n    }\n  }, onFail: function() { hide('participate_progress'); }, onCaptchaShow: function() { hide('participate_progress'); }});\n}});\nwindow.participatePart = function() {\n  var yg = ge('your_gift');\n  yg.style.paddingTop = yg.style.paddingBottom = '0px';\n  yg.innerHTML = '<input type=\"text\" class=\"inputText\" onblur=\"updateParticipate()\" id=\"participate_amount\" \/><span id=\"amount_rub\"><\/span>';\n  var pa = ge('participate_amount');\n  pa.value = '2700';\n  updateParticipate();\n  focusAtEnd(pa);\n  return false;\n}\nwindow.initParticipateTimer = setInterval(function() {\n  if (window.Autosize && window.DropdownMenu) {\n    new Autosize(ge('participate_comment'), {minHeight: 50});\n    var giftTypes = [\n      {i: 0, l: 'публичный (все видят сообщение и Ваше имя)'},\n      {i: 1, l: 'личный (получатель видит сообщение и Ваше имя)'},\n      {i: 2, l: 'анонимный (получатель видит только сообщение)'}\n    ];\n    new DropdownMenu(giftTypes, {target: ge('wish_privacy'), updateHeader: function(index) {\n      var giftTypesShort = ['виден всем', 'личный', 'анонимный'];\n      return giftTypesShort[intval(index)];\n    }, onSelect: function(e) {\n      ge('wish_privacy_value').value = e.target.index;\n    }});\n    clearInterval(window.initParticipateTimer);\n  }\n}, 100);\nwindow.noParticipateComment = function(el) {\n  hide('participate_comment_row', 'participate_no_msg');\n  show('participate_add_msg');\n  ge('participate_comment').value = '';\n  return false;\n}\nwindow.addParticipateComment = function(el) {\n  hide('participate_add_msg');\n  show('participate_comment_row', 'participate_no_msg');\n  focusAtEnd('participate_comment');\n  return false;\n}\nwinBoxes.participate.addControlsText('<span id=\"participate_msg\"><a id=\"participate_add_msg\" href=\"\" onclick=\"return addParticipateComment()\">Добавить сообщение<\/a><a id=\"participate_no_msg\" href=\"\" onclick=\"return noParticipateComment()\" style=\"display: none\">Скрыть сообщение<\/a><\/span>');\nwindow.participateLeft = 2700000;\nwindow.userRealMoney = 0;\nwindow.getParticipateAmount = function() {\n  if (!ge('participate_amount')) {\n    return participateLeft;\n  }\n  var amount = ge('participate_amount').value;\n  if (amount.indexOf(',') != -1) {\n    ge('participate_amount').value = amount = amount.replace(\/,\/g, '.');\n  }\n  amount = amount.replace(\/[^0-9\\.]\/g, '');\n  if (1000 * parseFloat(amount) < participateLeft && amount.indexOf('.') != -1) {\n    ge('participate_amount').value = amount = amount.substr(0, amount.indexOf('.'));\n  }\n  if (1000 * parseFloat(amount) < 1000) {\n    ge('participate_amount').value = amount = '1';\n  }\n  if (1000 * parseFloat(amount) > participateLeft) {\n    amount = participateLeft.toString();\n    if (intval(amount)) {\n      while (amount.length < 4) {\n        amount = '0' + amount;\n      }\n      amount = amount.substr(0, amount.length - 3) + '.' + amount.substr(amount.length - 3);\n      ge('participate_amount').value = amount.replace(\/0$\/, '').replace(\/\\.00$\/, '');\n    }\n  }\n  var dot = amount.indexOf('.');\n  if (dot != -1) {\n    var dot2 = amount.substr(dot + 1).indexOf('.');\n    if (dot2 != -1) {\n      amount = amount.substr(0, dot + dot2 + 1);\n    }\n  }\n  if (dot == -1) {\n    amount = amount + '.000';\n  } else if (dot == amount.length - 1) {\n    amount = amount + '000';\n  } else if (dot == amount.length - 2) {\n    amount = amount + '00';\n  } else if (dot == amount.length - 3) {\n    amount = amount + '0';\n  } else if (dot < amount.length - 4) {\n    amount = amount.substr(0, dot + 4);\n  }\n  amount = amount.replace('.', '').replace(\/^0+\/, '');\n  return amount;\n}\nwindow.updateParticipate = function(amount) {\n  if (amount === undefined) {\n    amount = getParticipateAmount();\n  }\n  var lang_clear_rub = [\"\",\" рубль\",\" рубля\",\" рублей\"];\n  if (ge('amount_rub')) {\n    ge('amount_rub').innerHTML = langNumeric(amount \/ 1000, lang_clear_rub);\n  }\n  if (amount > userRealMoney) {\n    ge('participate_not_enough').style.visibility = 'visible';\n  } else if (amount > 0) {\n    ge('participate_not_enough').style.visibility = 'hidden';\n  } else {\n    ge('participate_not_enough').style.visibility = 'hidden';\n  }\n}\nupdateParticipate();"}

вверх^ к полной версии понравилось! в evernote
Комментарии (1):


Комментарии (1): вверх^

Вы сейчас не можете прокомментировать это сообщение.

Дневник Без заголовка | ORenge - ЖизНЬ | Лента друзей ORenge / Полная версия Добавить в друзья Страницы: раньше»