General Testing
test

hourglass

View previous topic View next topic Go down

hourglass

Post by Ange Tuteur on 31/10/2015, 06:34

Professors, Prefects, and Head Boy/Girl are the only ones who may take away or add points to your house.

To add/subtract points, please use this format for each individual house:

Code:
[b]House:[/b]
[b]Points Added:[/b]
[b]Points Subtracted:[/b]

__________________________________________________________________

:50
:100
:25
:0


Last edited by Ange Tuteur on 31/10/2015, 07:14; edited 13 times in total
avatar
Ange Tuteur
Administrateur

Country :
Female
Posts : 414
Reputation : 32

View user profile http://help.forumotion.com

Back to top Go down

Re: hourglass

Post by Ange Tuteur on 31/10/2015, 07:08

Code:
$(function() {
  var a = $('.edit_value'),
      i = 0,
      j = a.length,
      edit, cell, link;

  for (; i < j; i++) {
    edit = $(a[i]).closest('.post').find('.i_icon_edit')[0];
    if (edit) {
      edit = edit.parentNode;

      link = document.createElement('A');
      link.href = edit.href;
      link.innerHTML = 'Edit';
      link.onclick = function() {
        var node = $(this).parent().prev()[0], t = this;
       
        if (node) {
          $.get(t.href, function(data) {
            var auth = $('input[name="auth[]"]', data),
                msg = $('#text_editor_textarea', data).val(),
                pts = prompt('Please insert a new value', msg.match(new RegExp('.*?\\[td class="' + node.className + '"\\](.*?)\\[/td\\].*'))[1] || 0);
            $.post('/post', 'subject=' + $('input[name="subject"]', data).val() + '&message=' + msg.replace(new RegExp('\\[td class="' + node.className + '"\\](.*?)\\[/td\\]'), '[td class="' + node.className + '"]' + pts + '[/td]') + '&mode=editpost&p=' + t.href.replace(/.*?p=(\d+).*/, '$1') + '&auth[]=' + auth[0].value + '&auth[]=' + auth[1].value + '&post=1', function() {
              node.innerHTML = pts;
            });
          });
          return false;
        }
      };

      cell = document.createElement('TD');
      cell.appendChild(link);

      a[i].parentNode.appendChild(cell);
    }
  }
});

------------
cat
avatar
Ange Tuteur
Administrateur

Country :
Female
Posts : 414
Reputation : 32

View user profile http://help.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum