[datapress] r160 committed - updates to lense code, updates to add help message

0 views
Skip to first unread message

codesite...@google.com

unread,
Mar 30, 2011, 3:11:35 PM3/30/11
to datapres...@googlegroups.com
Revision: 160
Author: edward.benson
Date: Wed Mar 30 12:10:58 2011
Log: updates to lense code, updates to add help message
http://code.google.com/p/datapress/source/detail?r=160

Added:
/trunk/plugin/css/pframe.css
/trunk/plugin/images/pframe
/trunk/plugin/images/pframe/b.png
/trunk/plugin/images/pframe/bl.png
/trunk/plugin/images/pframe/br.png
/trunk/plugin/images/pframe/l.png
/trunk/plugin/images/pframe/r.png
/trunk/plugin/images/pframe/t.png
/trunk/plugin/images/pframe/tl.png
/trunk/plugin/images/pframe/tr.png
Modified:
/trunk/plugin/configurator/configurator.js.php
/trunk/plugin/configurator/exhibit-configurator.php
/trunk/plugin/configurator/exhibit-inputbox-data-link.php
/trunk/plugin/configurator/exhibit-inputbox-lense-edit.php
/trunk/plugin/head-lightbox-library.php
/trunk/plugin/model/lens.php
/trunk/plugin/model/view.php
/trunk/plugin/save-exhibit.php
/trunk/plugin/wp-exhibit-activation-tools.php

=======================================
--- /dev/null
+++ /trunk/plugin/css/pframe.css Wed Mar 30 12:10:58 2011
@@ -0,0 +1,63 @@
+/**************************************************
+ * Lens wrapper modified from
+ *
http://www.webcredible.co.uk/user-friendly-resources/css/css-round-corners-borders.shtml
+ *************************************************/
+
+.dp-lenswrapper .tl {
+ background:url(../images/pframe/tl.png) 0 0 no-repeat;
+ height: 37px;
+ width: 33px;
+ float: left;
+}
+
+.dp-lenswrapper .t {
+ float: left;
+ background:url(../images/pframe/t.png) 0 0 repeat-x;
+ min-width:2em;
+}
+
+.dp-lenswrapper .tr {
+ float: right;
+ background:url(../images/pframe/tr.png) 0 no-repeat;
+ height: 37px;
+ width: 33px;
+}
+
+.dp-lenswrapper .l {
+ clear: both;
+ background:url(../images/pframe/l.png) 0 0 repeat-y;
+ min-height: 2em;
+ float: left;
+}
+
+.dp-lenswrapper .center {
+ background:url(../images/pframe/l.png) 0 0 repeat-y;
+ min-height: 20px;
+ float: left;
+}
+
+.dp-lenswrapper .r {
+ background:url(../images/pframe/r.png) 100% 0 repeat-y;
+ float: right;
+}
+
+.dp-lenswrapper .bl {
+ background: url(../images/pframe/bl.png) 0 100% no-repeat;
+ width:20em;
+ height: 37px;
+ width: 33px;
+ float: left;
+}
+
+.dp-lenswrapper .b {
+ background:url(../images/pframe/b.png) 0 100% repeat-x;
+ margin: 0 0 2px 0;
+ float: left;
+}
+
+.dp-lenswrapper .br {
+ background:url(../images/pframe/br.png) 100% 100% no-repeat;
+ height: 37px;
+ width: 33px;
+ float: right;
+}
=======================================
--- /dev/null
+++ /trunk/plugin/images/pframe/b.png Wed Mar 30 12:10:58 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/plugin/images/pframe/bl.png Wed Mar 30 12:10:58 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/plugin/images/pframe/br.png Wed Mar 30 12:10:58 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/plugin/images/pframe/l.png Wed Mar 30 12:10:58 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/plugin/images/pframe/r.png Wed Mar 30 12:10:58 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/plugin/images/pframe/t.png Wed Mar 30 12:10:58 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/plugin/images/pframe/tl.png Wed Mar 30 12:10:58 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/plugin/images/pframe/tr.png Wed Mar 30 12:10:58 2011
Binary file, no diff available.
=======================================
--- /trunk/plugin/configurator/configurator.js.php Wed Mar 30 12:05:17 2011
+++ /trunk/plugin/configurator/configurator.js.php Wed Mar 30 12:10:58 2011
@@ -125,8 +125,7 @@
//
win.tinyMCE.execInstanceCommand("exhibit-lenses-edit-html", "mceInsertContent",true,myValue);
}

-function ex_data_types_changed(e, arr) {
- // Get all types
+function ex_data_types_changed(e, arr) {
var types = db._types;
var props = db._properties;
var type_choice = "<option selected value=''> - </option>";
=======================================
--- /trunk/plugin/configurator/exhibit-configurator.php Wed Mar 30 12:05:17
2011
+++ /trunk/plugin/configurator/exhibit-configurator.php Wed Mar 30 12:10:58
2011
@@ -114,6 +114,7 @@
jQuery('#save_btn').bind("click", postExhibit);
jQuery('#save_insert_btn').bind("click", postExhibit);
jQuery('#save_insert_footnotes_btn').bind("click", postExhibit);
+
jQuery('#ex-tabs').tabs({
select: function(event, ui) {
alert('selected');
=======================================
--- /trunk/plugin/configurator/exhibit-inputbox-data-link.php Thu Mar 3
17:05:25 2011
+++ /trunk/plugin/configurator/exhibit-inputbox-data-link.php Wed Mar 30
12:10:58 2011
@@ -8,7 +8,7 @@
<table>
<tr>
<td>URL</td>
- <td><input id="exhibit-datasource-link-uri" type="text" size="30" />[<a
href="http://projects.csail.mit.edu/datapress/help/importing-data/"
target="_blank">URLs for different data sources</a>]</td>
+ <td><input id="exhibit-datasource-link-uri" type="text" size="30"
/>&nbsp; &nbsp; [ <a
href="http://projects.csail.mit.edu/datapress/help/importing-data/"
target="_blank">help with data importing</a> ]</td>
</tr>
<!--<tr>
<td>Type</td>
@@ -26,9 +26,26 @@
<td><input id="exhibit-datasource-link-sourcename" type="text" size="30"
/></td>
</tr>
</table>
-<p align="right"><a href="#" class="addlink" onclick="submit_data_link();
return false">Add Data Link</a></p>
+<p align="right">
+<!-- <a id="#upload_button" href="#" class="addlink">Upload File</a> -->
+<a href="#" class="addlink" onclick="submit_data_link(); return false">Add
Data Link</a></p>

<script type="text/JavaScript">
+
+ jQuery(document).ready(function() {
+ jQuery('#upload_button').click(function() {
+ formfield = jQuery('#exhibit-datasource-link-uri').attr('name');
+ tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
+ return false;
+ });
+
+ window.send_to_editor = function(html) {
+ imgurl = jQuery('img',html).attr('src');
+ jQuery('#exhibit-datasource-link-uri').val(imgurl);
+ tb_remove();
+ }
+ });
+
function kind_for(kind) {
if (kind == "google-spreadsheet") {
return "Google Spreadsheet";
=======================================
--- /trunk/plugin/configurator/exhibit-inputbox-lense-edit.php Thu Dec 10
12:01:32 2009
+++ /trunk/plugin/configurator/exhibit-inputbox-lense-edit.php Wed Mar 30
12:10:58 2011
@@ -17,9 +17,9 @@
Lens Decoration:
<select id="exhibit-lenses-edit-decoration">
<option value="none">None</option>
- <option value="simple-box">Grey Box</option>
- <option value="simple-orange">Rounded Orange
Border</option>
-
+ <option value="simple-box">Grey Border</option>
+ <option value="simple-orange">Rounded Orange Box</option>
+ <option value="pframe">Photo Frame</option>
</select>
</td>
<td align="right"><a href="#" class="addlink"
onclick="submit_lens(); return false">Save Lens</a></td>
=======================================
--- /trunk/plugin/head-lightbox-library.php Thu Feb 24 07:32:03 2011
+++ /trunk/plugin/head-lightbox-library.php Wed Mar 30 12:10:58 2011
@@ -1,8 +1,9 @@
<?php
if (!$guessurl = site_url())
$guessurl = wp_guess_url();
- $baseuri = $guessurl;
- $exhibituri = $baseuri . '/wp-content/plugins/datapress';
+ $baseuri = $guessurl;
+ $exhibituri = $baseuri . '/wp-content/plugins/datapress';
+
$linkstring = "";
$overlaystring = "";
foreach ($exhibits_to_show as $exhibit) {
=======================================
--- /trunk/plugin/model/lens.php Mon Nov 23 08:05:21 2009
+++ /trunk/plugin/model/lens.php Wed Mar 30 12:10:58 2011
@@ -41,24 +41,18 @@
$massaged_html = $this->massage_html($html);
$ret = "<div ex:role=\"lens\" itemTypes=\"$klass\" style=\"display:
none;\">
<div class=\"dp-lenswrapper\">
- <div class=\"t\">
- <div class=\"b\">
- <div class=\"r\">
- <div class=\"l\">
- <div class=\"bl\">
- <div class=\"br\">
- <div class=\"tl\">
- <div class=\"tr\">
- $massaged_html
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
+ <div class=\"tl\"></div>
+ <div class=\"t\"></div>
+ <div class=\"tr\"></div>
+
+ <div class=\"l\"></div>
+ <div class=\"center\">$massaged_html</div>
+ <div class=\"r\"></div>
+
+ <div class=\"bl\"></div>
+ <div class=\"b\"></div>
+ <div class=\"br\"></div>
+ </div>
</div>";
return $ret;
}
=======================================
--- /trunk/plugin/model/view.php Wed Mar 30 12:05:17 2011
+++ /trunk/plugin/model/view.php Wed Mar 30 12:10:58 2011
@@ -134,6 +134,8 @@
}
else if ($kind == "view-map") {
// Todo: add the actual location stuff
+
+
$field = $this->get('field');
$locationtype = $this->get('locationtype');
$where = "ex:latlng='.$field'";
=======================================
--- /trunk/plugin/save-exhibit.php Wed Feb 23 19:10:18 2011
+++ /trunk/plugin/save-exhibit.php Wed Mar 30 12:10:58 2011
@@ -66,6 +66,7 @@

}*/
$ex_exhibit->set('views', $views);
+


// Save exhibit-level configuration options
=======================================
--- /trunk/plugin/wp-exhibit-activation-tools.php Wed Mar 30 12:05:17 2011
+++ /trunk/plugin/wp-exhibit-activation-tools.php Wed Mar 30 12:10:58 2011
@@ -52,7 +52,7 @@
self::setup_table(WpExhibitConfig::$DATASCRAPS_TABLE_KEY,
$creation_sql);
}
-
+
static function setup_geocode_table() {
$creation_sql = " (
id INT NOT NULL AUTO_INCREMENT,

Reply all
Reply to author
Forward
0 new messages