Scott Nixon avatar Scott Nixon committed d264bbf

Updated formatting in a few files. Add type file to add support for embedding actions.

Comments (0)

Files changed (5)

 *.pyc
 db
 *~
+src

inbounding/dispatch/models.py

 from django.contrib.auth.models import User
 
 class Action(models.Model):
+    ACTION_TYPES = (
+	('1', 'Embed Action'),
+	('2', 'Floated Action'),
+    )
     label = models.CharField(max_length=128)
     url = models.CharField(max_length=128)
     code = models.TextField()
+    type = models.CharField(max_length=8, choices=ACTION_TYPES,)
     user = models.ForeignKey(User)
     created = models.DateTimeField(auto_now_add=True,null=True)
     lastmod = models.DateTimeField(auto_now=True)

inbounding/dispatch/static/in.js

 		    csscls = 'closed';
 		}
 		//var body = document.getElementsByTagName("body");
-		$('body').append('<div id="in_container"' +
-				 ' class="' + csscls + '"'
-                                 + '>' + s +
-				 results.code + '</div>');
+		var tmplt1 = "<div id='ck_container'><div class='top-layer'><div class='hide-open inner-light'><a id='ck_close'>close</a></div></div><div class='inner-light'><div class='action_box'>"
+		var tmplt2 = results.code + "</div></div></div>"
+		var orginal = '<div id="in_container">' + s + results.code + '</div>'
+
+		$('body').append(tmplt1 + tmplt2);
 	    }
 	}
     });
 
     INBOUND.queryAction(INBOUND.ref_url, INBOUND.host_url, INBOUND.usereval);
     INBOUND.loadcss();
+    
+
+
+    $('#ck_close').click( function () {
+	console.log('click success');
+	$('#ck_container').hide();
+    });
+
+    // Bind Close Event to #ck_close
+    //var b = document.getElementById('#ck_close');
+    
+
     // Value = 100 for Completed
     // Value = 101 for Closed
     INBOUND.setCookie("client_status", '4,100', (60*60*24*90), '', '');
 
 };
 
-INBOUND.css = 'http://localhost:8000/static/css/ck_main.css';
+INBOUND.css = 'http://localhost:8000/static/css/ck_main.css?v=3';
 
 /* Load CSS into the page with the Action Box.*/
 INBOUND.loadcss = function loadcss() { 
 
 (function () {
 
+    var ed = document.getElementById('ck_embed');
+    console.log(typeof ed);
+    console.log(ed);
+
     /* INIT referrer and host domain values */
     var referrer = 'digg.com'; //document.referrer;
     var dom = document.URL;
 	/* Sends ajax request to check if an action exists for the paras */
 	INBOUND.evaluate();
 
-	/*
-	if (action exists) {
-	    // IF ACTION exists
-		
-	    // READ COOKIE
-	    if (close cookie exists) {
-		// DONT DISPLAY the action
-		// DISPLAY minimized
-	    } 
-	}
-	*/
     } 	/* NO SESSION exits */
     else if (!get_sess) {
 

inbounding/dispatch/templates/demo.html

 </style>
 
 <div id='container1'>
+    <div class="top-layer">
+        <div class="hide-open inner-light">close</div>
+    </div>
+    <div class="inbox200 black-back">
 
-
-  <div class="top-layer">
-    <div class="hide-open inner-light">close</div>
-  </div>
-  <div class="inbox200 black-back">
-    <div class="">
-
-      <div class="content_box">
-	This is my box there are many like it but this one is mine.
-      </div>
-
+        <div class="content_box">
+            This is my box there are many like it but this one is mine.
+	</div>
     </div>
-  </div>
-
-
 </div>
 
 
 
 <div id='container'>
+    <div class="top-layer">
+        <div class="hide-open inner-light">close</div>
+    </div>
+    <div class="inbox200 shadowed">
+        <div class="inner-light">
 
-
-  <div class="top-layer">
-    <div class="hide-open inner-light">close</div>
-  </div>
-  <div class="inbox200 shadowed">
-    <div class="inner-light">
-
-      <div class="content_box">
-	This is my box there are many like it but this one is mine.
-      </div>
-
+	    <div class="content_box">
+	        This is my box there are many like it but this one is mine.
+	    </div>
+	</div>
     </div>
-  </div>
-
-
 </div>
 
 

inbounding/requirements.txt

 django-piston==0.2.2
 django-userena
 pil
+pip install -e git+https://github.com/leftium/mailsnake.git#egg=mailsnake
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.