# HG changeset patch # User David Eads # Date 1235716644 21600 # Node ID 5d2ae5b8eae2043d702d1e94d4374ea1edd2db56 # Parent 4626f7e31aa05bad6998bb8dd073593e03d66b1c Trying out pure image solution. diff -r 4626f7e31aa0 -r 5d2ae5b8eae2 dnd_test/dnd-library-item.tpl.php --- a/dnd_test/dnd-library-item.tpl.php Thu Feb 26 22:12:29 2009 -0600 +++ b/dnd_test/dnd-library-item.tpl.php Fri Feb 27 00:37:24 2009 -0600 @@ -5,8 +5,8 @@
+
-
diff -r 4626f7e31aa0 -r 5d2ae5b8eae2 dnd_test/dnd_test.css --- a/dnd_test/dnd_test.css Thu Feb 26 22:12:29 2009 -0600 +++ b/dnd_test/dnd_test.css Fri Feb 27 00:37:24 2009 -0600 @@ -5,14 +5,12 @@ } .dnd-library-wrapper { float: left; - width: 220px; - margin-right: 20px; + width: 250px; + margin-right: 10px; margin-top: 1em; - border: 1px solid #aaa; } .dnd-library-wrapper .header { padding: 1px 4px; - background-color: #ccc; } .dnd-library-wrapper .header h3 { font-size: 12px; @@ -30,36 +28,49 @@ } #edit-body-wrapper { float: left; - width: 700px; + width: 600px; +} +.dnd-library-wrapper .library { + border: 1px solid #aaa; + float: left; } .dnd-library-wrapper .editor-item { float: left; - width: 220px; - border-top: 1px solid #aaa; - margin-bottom: 1px; + width: 250px; + border-bottom: 2px solid #fff; + background-color: #ddd; } .dnd-library-wrapper .editor-item > div { - padding: 5px 4px; + padding: 3px; } .dnd-library-wrapper div.image { float: left; - width: 64px; - padding-left: 6px; + width: 32px; + padding-left: 4px; line-height: 1; } .dnd-library-wrapper div.meta { float: left; - width: 110px; + width: 149px; + line-height: 1.2; } .dnd-library-wrapper .title { font-weight: bold; + font-size: 12px; } .dnd-library-wrapper .date, .dnd-library-wrapper .author { - font-size: .75em; + font-size: 10px; + float: left; + margin-top: .5em; +} +.dnd-library-wrapper .author { + margin-right: 1em; } .dnd-library-wrapper .editor-item .sizes { float: left; - width: 18px; + width: 50px; + margin-top: 14px; + line-height: 1; } .dnd-library-wrapper .editor-item .sizes ul { list-style-type: none; @@ -68,8 +79,9 @@ .dnd-library-wrapper .editor-item .sizes ul li { background: none; list-style-type: none; + display: inline; padding: 0; - margin: 0; + margin: 0 0 0 2px; } .dnd-library-wrapper .editor-item .sizes a { float: left; diff -r 4626f7e31aa0 -r 5d2ae5b8eae2 dnd_test/dnd_test.module --- a/dnd_test/dnd_test.module Thu Feb 26 22:12:29 2009 -0600 +++ b/dnd_test/dnd_test.module Fri Feb 27 00:37:24 2009 -0600 @@ -20,7 +20,6 @@ return array('access dnd test library'); } - /** * Implementation of hook_form_alter(). * @@ -71,7 +70,7 @@ /** * Create contrived output */ -function dnd_test_generate_library($page = 1, $limit = 5) { +function dnd_test_generate_library($page = 1, $limit = 12) { $start = ($page * $limit) - ($limit); $end = $page * $limit; @@ -89,7 +88,7 @@ /** * Theme wrapper that spins out multiple library representations for a given - * editor representation. This is because we want to demonstrate how to allow + ;[''''* editor representation. This is because we want to demonstrate how to allow * for multiple versions (i.e. different sizes) of a single item */ function dnd_editor_items($i) { @@ -121,14 +120,11 @@ $variables['date'] = 'Feb 18 2009'; $variables['author'] = 'David Eads'; foreach(array(t('S'), t('M'), t('L')) as $size) { - $sizes[] = l(''. $size .'', '', array( - 'html' => TRUE, - 'attributes' => array( - 'class' => 'drop size-'. $size, - 'id' => 'item-'. $i .'-'. $size, - ), - 'query' => array('dnd_id' => 'item-'. $i .'-'. $size), - )); + $attributes = array( + 'class' => 'drop size-'. $size, + 'id' => 'item-'. $i .'-'. $size, + ); + $sizes[] = theme('image', drupal_get_path('module', 'dnd_test') .'/img/icon/'. $size .'.png', $size, $size, $attributes); } $variables['sizes'] = ''; } diff -r 4626f7e31aa0 -r 5d2ae5b8eae2 dnd_test/img/item-1-thumb.jpg Binary file dnd_test/img/item-1-thumb.jpg has changed diff -r 4626f7e31aa0 -r 5d2ae5b8eae2 dnd_test/img/item-2-thumb.jpg Binary file dnd_test/img/item-2-thumb.jpg has changed diff -r 4626f7e31aa0 -r 5d2ae5b8eae2 dnd_test/img/item-3-thumb.jpg Binary file dnd_test/img/item-3-thumb.jpg has changed