Author: david
Date: 2008-11-03 13:35:31 -0800 (Mon, 03 Nov 2008)
New Revision: 1514

Modified:
   
trunk/qubit/apps/qubit/modules/informationobject/templates/_newCreationEventDialog.php
   
trunk/qubit/apps/qubit/modules/informationobject/templates/editISADSuccess.php
Log:
Minor tweaks to make newCreationEvent dialog compatible with IE7
- Suppress border for <td> cells in the newCreationEvent table, so they don't 
appear as dis-associated lines in IE7,
- Remove extra whitespace and "\n" characters from javascript to append "Add 
creation event" link to creator table (Link was not rendering in IE7),
- Remove extra, unnecessary, Javascript functions from _newCreationEventDialog 
partial

Modified: 
trunk/qubit/apps/qubit/modules/informationobject/templates/_newCreationEventDialog.php
===================================================================
--- 
trunk/qubit/apps/qubit/modules/informationobject/templates/_newCreationEventDialog.php
      2008-11-03 18:26:24 UTC (rev 1513)
+++ 
trunk/qubit/apps/qubit/modules/informationobject/templates/_newCreationEventDialog.php
      2008-11-03 21:35:31 UTC (rev 1514)
@@ -18,87 +18,26 @@
    * Dialog object, so we don't see them when Javascript is turned off. Include
    * them here (instead of in .js file) to allow PHP to parse i18n tags. 
    */
-function inspect(obj, maxLevels, level)
-{
-  var str = '', type, msg;
-
-    // Start Input Validations
-    // Don't touch, we start iterating at level zero
-    if(level == null)  level = 0;
-
-    // At least you want to show the first level
-    if(maxLevels == null) maxLevels = 1;
-    if(maxLevels < 1)     
-        return '<font color="red">Error: Levels number must be > 0</font>';
-
-    // We start with a non null object
-    if(obj == null)
-    return '<font color="red">Error: Object <b>NULL</b></font>';
-    // End Input Validations
-
-    // Each Iteration must be indented
-    str += '<ul>';
-
-    // Start iterations for all objects in obj
-    for(property in obj)
-    {
-      try
-      {
-          // Show "property" and "type property"
-          type =  typeof(obj[property]);
-          str += '<li>(' + type + ') ' + property + 
-                 ( (obj[property]==null)?(': <b>null</b>'):('')) + '</li>';
-
-          // We keep iterating if this property is an Object, non null
-          // and we are inside the required number of levels
-          if((type == 'object') && (obj[property] != null) && (level+1 < 
maxLevels))
-          str += inspect(obj[property], maxLevels, level+1);
-      }
-      catch(err)
-      {
-        // Is there some properties in obj we can't access? Print it red.
-        if(typeof(err) == 'string') msg = err;
-        else if(err.message)        msg = err.message;
-        else if(err.description)    msg = err.description;
-        else                        msg = 'Unknown';
-
-        str += '<li><font color="red">(Error) ' + property + ': ' + msg 
+'</font></li>';
-      }
-    }
-
-      // Close indent
-      str += '</ul>';
-
-    return str;
-}
-   
-  function getAuthorizedFormOfName(actorId)
-  {
-    var thisUrl = '<?php echo url_for('actor/getAuthorizedName', true) 
?>?id='+actorId;
-    var response = $.getJSON(thisUrl, function (data) { 
alert(data.authorizedFormOfName); });
-  }
  
   // Do this right away
   $('body').prepend(
-    '<div class="yui-skin-sam">\n' +
-    '  <div id="newCreationEventDialog">\n' +
-    '    <div class="hd"><?php echo __('enter creator details') ?></div>\n' + 
-    '    <div class="bd">\n' +
-    '      <form action="" method="POST">\n' +
-    '      </form>\n' +
-    '    </div>\n' + 
-    '  </div>\n' +
-    '</div>\n'
+    '<div class="yui-skin-sam">' +
+    '<div id="newCreationEventDialog">' +
+    '<div class="hd"><?php echo __('enter creator details') ?></div>' + 
+    '<div class="bd">' +
+    '<form action="" method="POST" style="border: none">' +
+    '</form>' +
+    '</div>' +
+    '</div>' +
+    '</div>'
   );
   
   // Do this after newCreationEventDialog.js actions
   Drupal.behaviors.writeNewCreationHTML = function(context) 
   {
     // Write a link to open the form
-    $('table#creationEvents').append(
-      '        <tr id="addCreationEventLink">\n' +
-      '          <td colspan="3"><a 
href="javascript:Qubit.newCreationEventDialog.show()"><?php echo __('add a 
creation event') ?></a></td>\n' +
-      '        </tr>');
+    $("table#creationEvents").append('<tr id="addCreationEventLink"><td 
colspan="3"><a href="javascript:Qubit.newCreationEventDialog.show()"><?php echo 
__('add a creation event') ?></a></td></tr>');
+
   }
 //]]>
 </script>
\ No newline at end of file

Modified: 
trunk/qubit/apps/qubit/modules/informationobject/templates/editISADSuccess.php
===================================================================
--- 
trunk/qubit/apps/qubit/modules/informationobject/templates/editISADSuccess.php  
    2008-11-03 18:26:24 UTC (rev 1513)
+++ 
trunk/qubit/apps/qubit/modules/informationobject/templates/editISADSuccess.php  
    2008-11-03 21:35:31 UTC (rev 1514)
@@ -99,20 +99,20 @@
           <td class="headerCell" style="width: 40%;"><i><?php echo __('or'); 
?> </i><?php echo __('add new creator name'); ?></td>
         </tr>
         <tr>
-          <td colspan ="2"><?php echo object_select_tag($newCreationEvent, 
'getActorId', 
+          <td colspan ="2" style="border: none"><?php echo 
object_select_tag($newCreationEvent, 'getActorId', 
             array('related_class' => 'QubitActor',
               'name' => 'newCreationEvent[actorId]',
               'include_blank' => true,
               'peer_method' => 'getAllExceptUsers')) ?></td>
-          <td><?php echo input_tag('newCreationEvent[newActorAuthorizedName]') 
?></td>
+          <td style="border: none"><?php echo 
input_tag('newCreationEvent[newActorAuthorizedName]') ?></td>
         </tr>
         <tr>
           <td class="headerCell"><?php echo __('creation year'); ?></td><td 
class="headerCell"><?php echo __('end year (if range)'); ?></td>
           <td class="headerCell"><?php echo __('date display (defaults to date 
range)'); ?></td></tr>
         <tr>
-          <td><?php echo input_tag('newCreationEvent[creationYear]', '', 
'maxlength=4 style="width:35px;"') ?></td>
-          <td><?php echo input_tag('newCreationEvent[endYear]', '', 
'maxlength=4 style="width:35px;"') ?></td>
-          <td><?php echo input_tag('newCreationEvent[creationDateNote]') 
?></td>
+          <td style="border: none"><?php echo 
input_tag('newCreationEvent[creationYear]', '', 'maxlength=4 
style="width:35px;"') ?></td>
+          <td style="border: none"><?php echo 
input_tag('newCreationEvent[endYear]', '', 'maxlength=4 style="width:35px;"') 
?></td>
+          <td style="border: none"><?php echo 
input_tag('newCreationEvent[creationDateNote]') ?></td>
         </tr>
       </table>
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to