]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
Fixed merge conflict
authorDavid Seifried <david.c.seifried@gmail.com>
Fri, 29 Jul 2011 16:07:58 +0000 (12:07 -0400)
committerDavid Seifried <david.c.seifried@gmail.com>
Fri, 29 Jul 2011 16:07:58 +0000 (12:07 -0400)
1  2 
plugins/attribution/popcorn.attribution.js
plugins/code/popcorn.code.js
plugins/flickr/popcorn.flickr.js
plugins/footnote/popcorn.footnote.js
plugins/lastfm/popcorn.lastfm.js
plugins/openmap/popcorn.openmap.js
plugins/processing/popcorn.processing.js
plugins/tagthisperson/popcorn.tagthisperson.js
popcorn.js

Simple merge
index 955108f0e1f40c0ec6744c26fe0a630664f40fd1,dfd60314fb04468da6ae7f1fdf939431a31c85c3..a4d97381432181c2c599c4c2c5c56931a976a6d7
      containerDiv.style.height = "100%";
      containerDiv.style.display = "none";
      idx++;
 -    
 +
      // ensure the target container the user chose exists
-     if ( document.getElementById( options.target ) ) {
-       document.getElementById( options.target ).appendChild( containerDiv );
-     } else {
-       throw ( "flickr target container doesn't exist" );
++
+     if ( !target && Popcorn.plugin.debug ) {
+       throw new Error( "flickr target container doesn't exist" );
      }
 -    
+     target && target.appendChild( containerDiv );
 +
      // get the userid from Flickr API by using the username and apikey
      var isUserIDReady = function() {
        if ( !_userid ) {
index 44ce4e33763e8601b280bca2564271302badffc1,436f7dcc8be9496fab4c3c8804bdc000bf3da531..2f4781c2e42dfc944cf18fc56a1ef0f2457c0a5c
          } )
     *
     */
 -  Popcorn.plugin( "footnote" , {
 -    
 -    manifest: {
 -      about:{
 -        name: "Popcorn Footnote Plugin",
 -        version: "0.1",
 -        author: "@annasob",
 -        website: "annasob.wordpress.com"
 +
 +  Popcorn.forEach( [ "footnote", "text" ], function( name ) {
 +
 +    Popcorn.plugin( name , {
 +
 +      manifest: {
 +        about: {
 +          name: "Popcorn " + name + " Plugin",
 +          version: "0.2",
 +          author: "@annasob, @rwaldron",
 +          website: "annasob.wordpress.com"
 +        },
 +        options: {
 +          start: { elem: "input", type: "text", label: "In" },
 +          end: { elem: "input", type: "text", label: "Out" },
 +          text: { elem: "input", type: "text", label: "Text" },
 +          target: name + "-container"
 +        }
        },
-       _setup: function( options ) {
-         options._container = document.createElement( "div" );
-         options._container.style.display = "none";
-         options._container.innerHTML  = options.text;
 -      options:{
 -        start    : {elem:'input', type:'text', label:'In'},
 -        end      : {elem:'input', type:'text', label:'Out'},
 -        target   : 'footnote-container',
 -        text     : {elem:'input', type:'text', label:'Text'}
 -      }
 -    },
+     _setup: function(options) {
  
-         var target = document.getElementById( options.target );
+       var target = document.getElementById( options.target );
  
-         target && target.appendChild( options._container );
-       },
-       /**
-        * @member footnote
-        * The start function will be executed when the currentTime
-        * of the video  reaches the start time provided by the
-        * options variable
-        */
-       start: function( event, options ) {
-         options._container.style.display = "inline";
-       },
-       /**
-        * @member footnote
-        * The end function will be executed when the currentTime
-        * of the video  reaches the end time provided by the
-        * options variable
-        */
-       end: function( event, options ) {
-         options._container.style.display = "none";
-       },
-       _teardown: function( options ) {
- 
-         var target = document.getElementById( options.target );
+       options._container = document.createElement( 'div' );
+       options._container.style.display = "none";
+       options._container.innerHTML  = options.text;
  
-         target && target.removeChild( options._container );
+       if ( !target && Popcorn.plugin.debug ) {
+         throw new Error( "target container doesn't exist" );
        }
-     });
+       target && target.appendChild( options._container );
+     },
+     /**
+      * @member footnote 
+      * The start function will be executed when the currentTime 
+      * of the video  reaches the start time provided by the 
+      * options variable
+      */
+     start: function(event, options){
+       options._container.style.display = "inline";
+     },
+     /**
+      * @member footnote 
+      * The end function will be executed when the currentTime 
+      * of the video  reaches the end time provided by the 
+      * options variable
+      */
+     end: function(event, options){
+       options._container.style.display = "none";
+     },
+     _teardown: function( options ) {
+       document.getElementById( options.target ) && document.getElementById( options.target ).removeChild( options._container );
+     }
    });
++});
  
  })( Popcorn );
Simple merge
index 4a782e4a1715ef3c54c5b16a0963c13710a4bcfb,ccc3d08c18241445cd1da3d3136f02ad6f008006..b741241adce00f56545bbcfdf56b9a87ff3ea438
          pointLayer,
          selectControl,
          popup,
-         target;
-         
-     target = document.getElementById( options.target );
 +        isGeoReady,
+         target = document.getElementById( options.target );
  
      // create a new div within the target div
      // this is later passed on to the maps api
 -    newdiv               = document.createElement( 'div' );
 -    newdiv.id            = "openmapdiv" + i;
 -    newdiv.style.width   = "100%";
 -    newdiv.style.height  = "100%";
 +    newdiv = document.createElement( "div" );
 +    newdiv.id = "openmapdiv" + i;
 +    newdiv.style.width = "100%";
 +    newdiv.style.height = "100%";
      i++;
  
 -
+     if ( !target && Popcorn.plugin.debug ) {
+       throw new Error( "target container doesn't exist" );
+     }
++
      target && target.appendChild( newdiv );
  
      // callback function fires when the script is run
index 557b0fc0ae958b0e8ebdc072322d49220d5e0da1,8bd07f09116606083d3a1d98deccb23d55d99bd8..c0db64a3c48d053fd17c1ff1e533ef37cbdaf604
    Popcorn.plugin( "tagthisperson" , ( function() {
      
      return {
 -      manifest: {
 -        about:{
 -          name: "Popcorn tagthisperson Plugin",
 -          version: "0.1",
 -          author: "@annasob",
 -          website: "annasob.wordpress.com"
 -        },
 -        options:{
 -          start    : {elem:'input', type:'text', label:'In'},
 -          end      : {elem:'input', type:'text', label:'Out'},
 -          target   : 'tagthisperson-container',
 -          person   : {elem:'input', type:'text', label:'Name'},
 -          image    : {elem:'input', type:'text', label:'Image Src'},
 -          href     : {elem:'input', type:'text', label:'URL'}   
 -        }
 -      },
 +    
        _setup: function( options ) {
-         var exists = false;
+         var exists = false,
+             target = document.getElementById( options.target );
+ 
+         if ( !target && Popcorn.plugin.debug ) {
+           throw new Error( "target container doesn't exist" );
+         }
+ 
          // loop through the existing objects to ensure no duplicates
          // the idea here is to have one object per unique options.target
          for ( var i = 0; i < peopleArray.length; i++ ) {
diff --cc popcorn.js
Simple merge