Commits

Scott Nixon committed 7567f51

Fixed issue with building the name of the embed id #ck_embed_<number>. View logic is not complete.

Comments (0)

Files changed (3)

inbounding/dispatch/models.py

     lastmod = models.DateTimeField(auto_now=True)
         
     def __unicode__(self):
-        return self.user.username + " : " + self.url
+        return self.label + " | " + self.user.username + " : " + self.url
 
 
 class Refer(models.Model):

inbounding/dispatch/static/in.js

 		else if (s === '101') {
 		    // Added class='ck_closed'
 		    if (results.type === '1') {
-			$('#ckembed_' + results.id).html();
+			$('#ck_embed_' + results.id).html();
 		    }
 		    else if (results.type === '2') {
 			$('body').append(tmplt1b + tmplt2);
 		    }
 		} 
 		else {
-		    console.log("No Status")
 		    /* This is the default event that will show the template in 
 		     * an unchanged state.
 		    */
-		    console.log(results.type);
+
 		    if (results.type === '1') {
-			$('#ckembed_' + results.id).html(ck_embed);		
+			var name = '#ck_embed_' + results.id;
+			$(name).html(ck_embed);	
 		    }
 		    else if (results.type === '2') {
 			$('body').append(tmplt1a + tmplt2);
     /* UID LOGIC
      * All users get a UID.
      */
-    var chk_uid = INBOUND.getCookie("uid");
+    var chk_uid = INBOUND.getCookie("ck_uid");
     // Check IF UID exists
     if (chk_uid && typeof chk_uid === 'string') {
 	
     else {
 	/* Setup unique id of browser if uid does not exist. */
 	var newuser = INBOUND.makeUUID();
-	INBOUND.setCookie('uid', newuser, (60*60*24*365), '/', '');
+	INBOUND.setCookie('ck_uid', newuser, (60*60*24*365), '/', '');
     }
 
 	

inbounding/dispatch/views.py

                 
         return render_to_response('hops/edit_breweries.html', locals(),context_instance=RequestContext(request))
 
-
 @login_required
 def action_page(request, id=None):
-    // MUST FIX LOGIC.
+    # MUST FIX LOGIC.
     if request.method == 'POST' and request.POST.get('id'):
         return update_object(request, form_class=ActionForm, 
                              object_id=id,