Scalling in montage view - Have a bug with ZM 1.24.3 SVN

Forum for questions and support relating to the 1.24.x releases only.
Locked
christophe_y2k
Posts: 102
Joined: Mon Oct 12, 2009 8:47 am
Location: EUROPE-FRANCE-MANDELIEU

Scalling in montage view - Have a bug with ZM 1.24.3 SVN

Post by christophe_y2k »

Hello

When i try to use scalling in montage view
with SVN ZM 1.24.3 updated today
nothing change

i use: override detection streaming browser to "NO"
Method should be used "JPEG"
I use Cambozzola
and Firefox

Thanks
midian
Posts: 11
Joined: Mon Jun 08, 2009 12:18 am
Location: New England, USA

Post by midian »

There are a few posts about this, but I believe the consensus is that Montage scaling does not work in Firefox, but may in other browsers. I admit it seems a bit strange that an open source product would favor M$.
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Post by timcraig »

I've been having issues with the montage scaling since several minor release back. It's always been an issue with the mootools libs. Firebug is good for locating these problems.

They've alway been where mootools assume a parameter is defined and try's to call a member varaible from the pramater. In 1.24.3's latest SVN version, it's (in a expanded view):

Code: Select all

function(a,b)
{
  if(b._groupSend)
  {
    return this;
  }
The parameter b is undefined. When running the montage view and causes a java script error (which kills the rest of the javascript on that page). It's pretty bad practice to blindly trust input parameters like that.

I've never had a chance to drill down into mootools and see why b is undefined, so I just make the function exit when b is undefined.

Here is a patch of my change off of ZM SVN:

Code: Select all

Index: web/tools/mootools/mootools-1.2.5.1-more-yc.js
===================================================================
--- web/tools/mootools/mootools-1.2.5.1-more-yc.js	(revision 3224)
+++ web/tools/mootools/mootools-1.2.5.1-more-yc.js	(working copy)
@@ -479,7 +479,7 @@
 }});Request.JSONP.counter=0;Request.JSONP.request_map={};Request.Queue=new Class({Implements:[Options,Events],Binds:["attach","request","complete","cancel","success","failure","exception"],options:{stopOnFailure:true,autoAdvance:true,concurrent:1,requests:{}},initialize:function(a){if(a){var b=a.requests;
 delete a.requests;}this.setOptions(a);this.requests=new Hash;this.queue=[];this.reqBinders={};if(b){this.addRequests(b);}},addRequest:function(a,b){this.requests.set(a,b);
 this.attach(a,b);return this;},addRequests:function(a){$each(a,function(c,b){this.addRequest(b,c);},this);return this;},getName:function(a){return this.requests.keyOf(a);
-},attach:function(a,b){if(b._groupSend){return this;}["request","complete","cancel","success","failure","exception"].each(function(c){if(!this.reqBinders[a]){this.reqBinders[a]={};
+},attach:function(a,b){if(b == undefined){return;}if(b._groupSend){return this;}["request","complete","cancel","success","failure","exception"].each(function(c){if(!this.reqBinders[a]){this.reqBinders[a]={};
 }this.reqBinders[a][c]=function(){this["on"+c.capitalize()].apply(this,[a,b].extend(arguments));}.bind(this);b.addEvent(c,this.reqBinders[a][c]);},this);
 b._groupSend=b.send;b.send=function(c){this.send(a,c);return b;}.bind(this);return this;},removeRequest:function(b){var a=$type(b)=="object"?this.getName(b):b;
 if(!a&&$type(a)!="string"){return this;}b=this.requests.get(a);if(!b){return this;}["request","complete","cancel","success","failure","exception"].each(function(c){b.removeEvent(c,this.reqBinders[a][c]);
This patches the mootool file Zoneminders source folder, you can apply that patch to your source folder and do a "make install".
beire
Posts: 15
Joined: Sun Sep 05, 2010 10:55 pm
Location: België

Post by beire »

i copied your source to a diff file and executed the following command:

patch mootools-1.2.5.1-more-yc.js < patch.diff

The command outputs the following:

Code: Select all

patching file mootools-1.2.5.1-more-yc.js
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 479.
1 out of 1 hunk FAILED -- saving rejects to file mootools-1.2.5.1-more-yc.js.rej
this is the rejects file:

Code: Select all

Index: mootools-1.2.5.1-more-yc.js
--- mootools-1.2.5.1-more-yc.js (revision 3224) 
+++ mootools-1.2.5.1-more-yc.js (working copy) 
@@ -479,7 +479,7 @@
 }});Request.JSONP.counter=0;Request.JSONP.request_map={};Request.Queue=new Class({Implements:[Options,Events],Binds:["attach","request","complete","cancel","success","failure",
 delete a.requests;}this.setOptions(a);this.requests=new Hash;this.queue=[];this.reqBinders={};if(b){this.addRequests(b);}},addRequest:function(a,b){this.requests.set(a,b);
 this.attach(a,b);return this;},addRequests:function(a){$each(a,function(c,b){this.addRequest(b,c);},this);return this;},getName:function(a){return this.requests.keyOf(a);
-},attach:function(a,b){if(b._groupSend){return this;}["request","complete","cancel","success","failure","exception"].each(function(c){if(!this.reqBinders[a]){this.reqBinders[a]
+},attach:function(a,b){if(b == undefined){return;}if(b._groupSend){return this;}["request","complete","cancel","success","failure","exception"].each(function(c){if(!this.reqBin
 }this.reqBinders[a][c]=function(){this["on"+c.capitalize()].apply(this,[a,b].extend(arguments));}.bind(this);b.addEvent(c,this.reqBinders[a][c]);},this);
 b._groupSend=b.send;b.send=function(c){this.send(a,c);return b;}.bind(this);return this;},removeRequest:function(b){var a=$type(b)=="object"?this.getName(b):b;
I have no expercience doing patches, so i'm guessing i'm doing something wrong...
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Post by timcraig »

Beire, try moving the patch.diff to your Zoneminder source folder. Then open a terminal and change the directory to you Zoneminder source folder and run the command:

patch -p0 -i patch.diff
Locked