How to use the conf.servers function in conf

To help you get started, we’ve selected a few conf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nbproject / nbproject / content / modules / pers.js View on Github external
if (x.status.errno) {
        //just display that there was an error for now
        if (errback !== undefined) {
          errback(x.status, x.payload);
        }

        $.L(x.status.msg);
        return;
      }

      //     console.log("cb w/ x=", x);
      callback(x.payload);
    };

    var auth_str = Conf.userinfo.guest ? 'guest=1' : 'ckey=' + Conf.userinfo.ckey;
    $.post(Conf.servers.rpc + '/pdf4/rpc?' + auth_str, { cid: Pers.connection_id, f: fctname, a: JSON.stringify(dict) }, cb, 'json');
  };
github nbproject / nbproject / content / modules / files.js View on Github external
Ok: function () {
          var form = $('#file_update_form')[0];
          var newauth = ('ckey' in Conf.userinfo) ? '&ckey=' + Conf.userinfo.ckey : '';
          form.setAttribute('action', Conf.servers.upload + '/pdf3/upload/update?id_source=' + id + newauth);
          form.submit();
          $.I('Updating in progress...');
          $(this).dialog('destroy');
        },
      },
github nbproject / nbproject / content / ui / admin / init.desktop.js View on Github external
content: function ($div) {
          $div.filesView({ img_server: Conf.servers.img,  admin: Pers.admin });
          $div.filesView('set_model', Pers.store);
        },
      };
github nbproject / nbproject / content / ui / admin / init.spreadsheet.js View on Github external
content: function ($div) {
          $div.docView({ img_server: Conf.servers.img });
          $div.docView('set_model', Pers.store);
          /*
          window.setTimeout(function(){
                  $div.docView("set_model",Pers.store );
              }, 5000);
          */
        },
      };
github nbproject / nbproject / content / ui / admin / init.youtubeviewer.js View on Github external
content: function ($div) {
                                     $div.docView({ img_server: Conf.servers.img });
                                     $div.docView('set_model', Pers.store);
                                   },
                               };
github nbproject / nbproject / content / ui / admin / init.collage.js View on Github external
content: function ($div) {
          $div.docView({ img_server: Conf.servers.img });
          window.setTimeout(function () {
            $div.docView('set_model', Pers.store);
          }, 5000);
        },
      };
github nbproject / nbproject / content / ui / admin / init.pdfviewer.js View on Github external
content: function ($div) {
          $div.docView({ img_server: Conf.servers.img });
          $div.docView('set_model', Pers.store);
        },
      };
github nbproject / nbproject / content / modules / buildEmbed.js View on Github external
$.concierge.keydown_block = false;

    //register for some events:
    $.concierge.addListeners(Pers, {
      successful_login: function (evt) {
        Auth.set_cookie('ckey', evt.value.ckey);
        Auth.set_cookie('userinfo', evt.value.userinfo);
        Conf.userinfo = JSON.parse(unescape(evt.value.userinfo));
        $.I('Welcome ' + Conf.userinfo.firstname + " " + Conf.userinfo.lastname);
        f_prepare_sidebar();
        Pers.set_nav_user();
      },
    }, 'globalPersObject');

    //tell who to make rpc requests to
    Conf.servers.rpc = Pers.server_url;

    $('body').append("<div class="nb_sidebar nb_inactive"></div>");

    $('#login_to_nb').click(function () {
      $.concierge.get_component('login_user_menu')();
    });

    //if user identified already, let's proceed:
    if (Conf.userinfo) {
      //optimization to get this visibile faster
      //if ckey is invalid, sidebar will be erased
      //and replaced by a login button
      f_prepare_sidebar();
    }

    window.addEventListener('message', function (e) {