Index: js/promos.js
===================================================================
RCS file: /cvs/promos/js/promos.js,v
retrieving revision 1.1
diff -u -r1.1 promos.js
--- js/promos.js	3 Aug 2009 20:39:47 -0000	1.1
+++ js/promos.js	5 Aug 2009 04:52:46 -0000
@@ -70,6 +70,16 @@
   //reattach thickbox links
   tb_init($('a.promothickbox, area.promothickbox, input.promothickbox', context));
   
+  //This is the link handler for creation links clicked in the thickbox
+  $('.promo-create', context).click(function() {
+    var href = this.href;
+    if($("#promos-global:checked").length) {
+      href += '&global=1';
+    }
+    location = href;
+    return false;
+  });
+  
   //This is the link handler for assignment links clicked in the thickbox
   $('.promos-assign', context).click(function() {
     //close the thickbox
Index: promos.module
===================================================================
RCS file: /cvs/promos/promos.module,v
retrieving revision 1.3
diff -u -r1.3 promos.module
--- promos.module	5 Aug 2009 04:36:22 -0000	1.3
+++ promos.module	5 Aug 2009 04:54:02 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: promos.module,v 1.3 2009/08/05 04:36:22 admin Exp $
+// $Id: promos.module,v 1.1 2009/08/03 20:39:46 admin Exp $
 
 
 /***********Define Constants************************/
@@ -154,6 +154,19 @@
   if (isset($aForm['type']) && isset($aForm['#node']) && $aForm['type']['#value'] .'_node_form' == $sFormId) {
     //This condition indicates we are at node/add/(nodetype)/promo
     if(arg(3) == 'promo' && promos_is_allowed_promo_type($aForm['#node']->type)) {
+      $aForm['promos'] = array(
+        '#title' => t('Promo'),
+        '#type' => 'fieldset',
+        '#collapsible' => false,
+        '#collapsed' => false,
+        '#weight' => -50,
+    );
+      $aForm['promos']['promos_global'] = array(
+        '#title' => t('Global'),
+        '#type' => 'checkbox',
+        '#default_value' => $_GET['global'] ? true : false,
+        '#description' => t('Checking this box will make this promo item appear on every page where it\'s parent block is enabled'),
+      );
       $aForm['promos_create'] = array(
         '#type' => 'value',
         '#value' => true,
@@ -286,6 +299,7 @@
         if($oNode->promos_delta) {
           $oPromoObject->delta = $oNode->promos_delta;
           $oPromoObject->path = $oNode->promos_path;
+          $oPromoObject->global = $oNode->promos_global ? 1 : 0;
           drupal_write_record('promos', $oPromoObject);
         }
       }
@@ -391,7 +405,7 @@
     )
   );
 
-  print ($sOutput . drupal_render($aCheckboxElement));
+  print (drupal_render($aCheckboxElement) . $sOutput);
   exit;
 }
 
@@ -559,10 +573,21 @@
   foreach (promos_get_types() as $sType) {
     $aInfo = content_types($sType);
     if(node_access('create', array('type' => $aInfo['type'])) && promos_access('create promos', $sType, $iDelta)) {
-      $aRows[] = array( l('Create "'.$aInfo['name'].'" promo', 'node/add/'.$aInfo['url_str'].'/promo/'.$iDelta,array('query' => drupal_get_destination().'&path='.$_GET['path'])) );
+      $aRows[] = array( l(t('Create "') . $aInfo['name'] . '" promo', 'node/add/' . $aInfo['url_str'] . '/promo/'.$iDelta, array('query' => drupal_get_destination() . '&path=' . $_GET['path'], 'attributes' => array('class' => 'promo-create'))));
     }
   }
-  print theme('table', array(), $aRows);
+  $aLinks = theme('table', array(), $aRows);
+  $aCheckboxElement = array(
+    'assignglobal' =>
+    array(
+      '#title' => 'Global',
+      '#type' => 'checkbox',
+      '#description' => t('Checking this box will make the new promo item appear on every page where it\'s parent block is enabled'),
+      '#id' => 'promos-global',
+    )
+  );
+
+  print (drupal_render($aCheckboxElement). $aLinks);
   exit;
 }
 /**********************[END] Pages *************************/
@@ -784,6 +809,9 @@
   if($aForm['promos_path']) {
     $aForm['#node']->promos_path = $aFormState['values']['promos_path'];
   }
+  if($aForm['promos_global']) {
+    $aForm['#node']->promos_global = true;
+  }
 }
 
 function promos_get_perm($sOp, $sType = null, $iDelta) {
@@ -1118,6 +1146,7 @@
       }
     }
 
+    $sPromos = '';
     foreach ($aPromos as $oPromo) {
       $sPromos .=  promo_view($oPromo, $iDelta);
     }


