Skip to content

Commit

Permalink
- Fix for bug #22
Browse files Browse the repository at this point in the history
 - new version 0.0.8
  • Loading branch information
spcsser committed Dec 22, 2014
1 parent f6f65ef commit 4ee6a92
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions ep.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"socketio" : "ep_adminpads/index:socketio",
"padRemove" : "ep_adminpads/index:updatePads",
"padCreate" : "ep_adminpads/index:updatePads",
"eejsBlock_adminMenu" : "ep_adminpads/index"
"eejsBlock_adminMenu" : "ep_adminpads/index:eejsBlock_adminMenu"
},
"client_hooks" : {
"documentReady" : "ep_adminpads/static/js/admin/pads"
"documentReady" : "ep_adminpads/static/js/admin/pads:documentReady"
}
}
]
Expand Down
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ var io = null;
exports.socketio = function (hook_name, args, cb) {
io = args.io.of("/pluginfw/admin/pads");
io.on('connection', function (socket) {
if (!socket.handshake.session.user || !socket.handshake.session.user.is_admin) return;

socket.on("load", function (query) {
pads.search({pattern:'', offset:0, limit:queryLimit}, function (progress) {
socket.emit("search-result", progress);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ep_adminpads",
"version": "0.0.7",
"version": "0.0.8",
"description": "Gives the ability to list and administrate all pads on admin page",
"author": "spcsser (Swen Jung) <swen.jung@psx-technology.com>",
"engines": { "node": ">= 0.6.0"},
Expand Down
4 changes: 3 additions & 1 deletion static/js/admin/pads.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ exports.documentReady=function(hooks, context, cb){
baseURL = pathComponents.slice(0,pathComponents.length-2).join('/') + '/',
resource = baseURL.substring(1) + "socket.io";

var room = url + "pluginfw/admin/pads";

//connect
socket = io.connect(url, {resource : resource}).of("/pluginfw/admin/pads");
socket = io.connect(room, {resource : resource});

$('.search-results').data('query', {
pattern: '',
Expand Down
6 changes: 1 addition & 5 deletions templates/admin/pads.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>Pad administration</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="../static/css/admin.css">

<% e.begin_block("scripts"); %>
Expand All @@ -28,10 +28,6 @@

$ = jQuery = require('ep_etherpad-lite/static/js/rjquery').jQuery; // Expose jQuery #HACK

if ((!$.browser.msie) && (!($.browser.mozilla && $.browser.version.indexOf("1.8.") == 0))) {
document.domain = document.domain; // for comet
}

var plugins = require('ep_etherpad-lite/static/js/pluginfw/client_plugins');
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');

Expand Down

0 comments on commit 4ee6a92

Please sign in to comment.