App-Standby

 view release on metacpan or  search on metacpan

examples/complex/complex_endpoint.pl  view on Meta::CPAN

    print "ERROR";
}

sub update {
    my $q = shift;
    my $group_id = $q->param('group_id');
    my $queue = $q->param('queue');

    return unless $queue && $group_id;

    $queue = URI::Escape::uri_unescape($queue);
    my $JSON = JSON::->new()->utf8();
    my $queue_ref = $JSON->decode($queue);
    $queue = undef;

    # the current jantior is on top of the list
    my $current_janitor = $queue_ref->[0]->{'username'};

    # the last janitor is at the end of the list
    my $prev_janitor = $queue_ref->[-1]->{'username'};

examples/simple/simple_endpoint.pl  view on Meta::CPAN

    print "ERROR";
}

sub update {
    my $q = shift;
    my $group_id = $q->param('group_id');
    my $queue = $q->param('queue');

    return unless $queue && $group_id;

    $queue = URI::Escape::uri_unescape($queue);
    my $JSON = JSON::->new()->utf8();
    my $queue_ref = $JSON->decode($queue);
    $queue = undef;

    my $dsn = "DBI:mysql:database=$db_database;host=$db_hostname;user=$db_username;password=$db_password";
    my $dbh = DBI->connect($dsn);

    my $sql = <<EOS;
CREATE TABLE IF NOT EXISTS `standby_queue` (
  `id` int(16) NOT NULL AUTO_INCREMENT,

lib/App/Standby/Service/HTTP.pm  view on Meta::CPAN


    return $UA;
}

# your code here ...
sub _build_payload {
    my $self = shift;
    my $user_ref = shift;

    my $content = $self->_json()->encode($user_ref);
    $content = URI::Escape::uri_escape($content);
    #$content =~ s/%3D/=/g;
    $content = 'queue='.$content;
    $content .= '&group_id='.$self->_config_value($self->name().'_group_id');

    return $content;
}

sub _update {
    my $self = shift;
    my $user_ref = shift;

share/res/js/bootstrap.js  view on Meta::CPAN

    , show: function () {
        var that = this
          , e = $.Event('show')

        this.$element.trigger(e)

        if (this.isShown || e.isDefaultPrevented()) return

        this.isShown = true

        this.escape()

        this.backdrop(function () {
          var transition = $.support.transition && that.$element.hasClass('fade')

          if (!that.$element.parent().length) {
            that.$element.appendTo(document.body) //don't move modals dom position
          }

          that.$element.show()

share/res/js/bootstrap.js  view on Meta::CPAN

        var that = this

        e = $.Event('hide')

        this.$element.trigger(e)

        if (!this.isShown || e.isDefaultPrevented()) return

        this.isShown = false

        this.escape()

        $(document).off('focusin.modal')

        this.$element
          .removeClass('in')
          .attr('aria-hidden', true)

        $.support.transition && this.$element.hasClass('fade') ?
          this.hideWithTransition() :
          this.hideModal()

share/res/js/bootstrap.js  view on Meta::CPAN


    , enforceFocus: function () {
        var that = this
        $(document).on('focusin.modal', function (e) {
          if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
            that.$element.focus()
          }
        })
      }

    , escape: function () {
        var that = this
        if (this.isShown && this.options.keyboard) {
          this.$element.on('keyup.dismiss.modal', function ( e ) {
            e.which == 27 && that.hide()
          })
        } else if (!this.isShown) {
          this.$element.off('keyup.dismiss.modal')
        }
      }

share/res/js/bootstrap.js  view on Meta::CPAN

      }
      return isSupported
    }

  , move: function (e) {
      if (!this.shown) return

      switch(e.keyCode) {
        case 9: // tab
        case 13: // enter
        case 27: // escape
          e.preventDefault()
          break

        case 38: // up arrow
          e.preventDefault()
          this.prev()
          break

        case 40: // down arrow
          e.preventDefault()

share/res/js/bootstrap.js  view on Meta::CPAN

        case 17: // ctrl
        case 18: // alt
          break

        case 9: // tab
        case 13: // enter
          if (!this.shown) return
          this.select()
          break

        case 27: // escape
          if (!this.shown) return
          this.hide()
          break

        default:
          this.lookup()
      }

      e.stopPropagation()
      e.preventDefault()

share/res/js/bootstrap.min.js  view on Meta::CPAN

/*!
* Bootstrap.js by @fat & @mdo
* Copyright 2012 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",tran...



( run in 0.478 second using v1.01-cache-2.11-cpan-5467b0d2c73 )