I was looking at jQuery code (trying to add a CAManagement tab -just to learn
some of Matterhorn).
As Tobias mentioned, I would like to find a problem, propose solution, and then
introduce it into the project (by getting a ticket etc.).
So to be constructive:
I have researched latest Matterhorn 1.4 (trunk rev 12275) of course!
And there are 4 different approaches:
Approach 1
oc.statistics.js:
======================
ocStatistics = new (function() ....
this.Component = function ...
Approach 2
oc.admin.js:
=============
var ocAdmin = (function() {
var admin = {};
admin.Component = ....
Approach 3
oc.episode.js:
===================
var opencast = opencast || {};
opencast.episode = (function() {
.....
Approach 4
oc.upload.js: (BTW: this file is not used any more)
===============
var ocUpload = ocUpload || {};
ocUpload.init = function()
And her is a serious problem I think, as long oc.upload.new.js, was written in
Approach 2 style:
oc.upload.new.js:
=========================
var ocUpload = (function() {
this.init = function() {
}
return this; ) ;
why it causes a problem ?
If somebody would like to add a simple tab to Matterhorn like
(oc.capture_admin_managment.js), s/he would start with:
var ocCAManager = (function() {
this.init = function() {
.....
and there you go! Uploads are ruined by new tab (or vice versa depends on the
order of includes in index.html).
So, my proposal is to :
==============================
1. pick an approach
2. Mark obselete approaches in source code as - not to be duplicated (or like:
to be changed by newcomers to the project).
+instruction how to do this.
3. fix oc.upload.new.js -- I can do this taks.
=============
What do you think about it ?
I
_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn
To unsubscribe please email
[email protected]
_______________________________________________