GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/zmack/mephisto.git
Added basic theme interface.  Will change in the future

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2211 
567b1171-46fb-0310-a4c9-b4bef9110e78
Caged (author)
Mon Sep 18 16:50:59 -0700 2006
commit  9b7d905bdf636f720a1bb43ef4158189cefae97b
tree    eb24072ad13ecfeb199fc8d073a548b3d4101d1a
parent  79943b8c0199d594f3455dca87979345b1ef5d7f
...
2
3
4
 
5
6
7
...
2
3
4
5
6
7
8
0
@@ -2,6 +2,7 @@
0
   <div id="page-nav">
0
     <ul id="act-nav" class="clear">
0
       <li><%= link_to "New template", :controller => 'design' %></li>
0
+ <li><%= link_to "Manage themes", :controller => 'themes' %></li>
0
     </ul>
0
   </div>
0
 <% end %>
...
456
457
458
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
460
461
...
475
476
477
 
 
 
 
 
478
479
480
...
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
...
533
534
535
536
537
538
539
540
541
542
543
0
@@ -456,6 +456,64 @@ SmartSearch.prototype = {
0
   }
0
 }
0
 
0
+
0
+ToolBox = Class.create();
0
+ToolBox.current = null;
0
+ToolBox.prototype = {
0
+ initialize: function(element) {
0
+ this.toolbox = $(element);
0
+ if(!this.toolbox) return;
0
+ this.timeout = null;
0
+ this.tools = this.findTools();
0
+
0
+ Event.observe(this.toolbox, 'mouseover', this.onHover.bindAsEventListener(this), true);
0
+ Event.observe(this.toolbox, 'mouseout', this.onBlur.bindAsEventListener(this), true);
0
+ Event.observe(this.tools, 'mouseover', this.onHover.bindAsEventListener(this));
0
+ Event.observe(this.tools, 'mouseout', this.onBlur.bindAsEventListener(this));
0
+ },
0
+
0
+ show: function() {
0
+ if(this.timeout) {
0
+ clearTimeout(this.timeout);
0
+ this.timeout = null;
0
+ }
0
+
0
+ if(ToolBox.current) {
0
+ ToolBox.current.hideTools();
0
+ }
0
+
0
+ if(this.tools) {
0
+ Element.show(this.tools);
0
+ ToolBox.current = this;
0
+ }
0
+ },
0
+
0
+ onHover: function(event) {
0
+ this.show();
0
+ },
0
+
0
+ onBlur: function(event) {
0
+ this.considerHidingTools();
0
+ },
0
+
0
+ considerHidingTools: function() {
0
+ if(this.timeout) { clearTimeout(this.timeout); }
0
+ this.timeout = setTimeout(this.hideTools.bind(this), 500);
0
+ },
0
+
0
+ hideTools: function() {
0
+ clearTimeout(this.timeout);
0
+ this.timeout = null;
0
+ Element.hide(this.tools);
0
+ },
0
+
0
+ findTools: function() {
0
+ var tools = document.getElementsByClassName('tools', this.toolbox)[0];
0
+ if(!tools) { throw "You called new ToolBox() on an element which has no class=\"tools\" child element"; }
0
+ return tools;
0
+ }
0
+}
0
+
0
 Effect.DefaultOptions.duration = 0.25;
0
 Event.addBehavior({
0
   '#filesearch': function() { window.spotlight = new Spotlight('filesearchform', 'filesearch'); },
0
@@ -475,6 +533,11 @@ Event.addBehavior({
0
   '#searchsubmit:click': function() {
0
     $('published').value = '0';
0
     $('article-search').submit();
0
+ },
0
+
0
+ '.theme': function() {
0
+ console.log(this);
0
+ new ToolBox(this);
0
   }
0
 });
0
 
...
1398
1399
1400
1401
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1402
1403
 
 
1404
1405
1406
...
1499
1500
1501
1502
1503
1504
1505
...
1398
1399
1400
 
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
 
1479
1480
1481
1482
1483
...
1576
1577
1578
 
1579
1580
1581
0
@@ -1398,9 +1398,86 @@ li.event-article { background-image: url(/images/mephisto/icons/articleb.gif);
0
 .file-tools li.fdelete a { background-image: url(/images/mephisto/icons/8-em-cross.png) }
0
 .pdf { width: 100px; height: 100px;}
0
 .fspin img { position: absolute; left: 40%; top: 40%;}
0
-/*
0
+
0
+
0
+/*------------------------------------------------------------------------
0
+ *=THEMES
0
+ ------------------------------------------------------------------------*/
0
+#themelist {
0
+ list-style: none;
0
+}
0
+
0
+#themelist li {
0
+ display: block;
0
+ float: left;
0
+ width: 30%;
0
+ position: relative;
0
+}
0
+
0
+#themelist ul li {
0
+ float: none;
0
+}
0
+
0
+.theme {
0
+ margin-bottom: 20px;
0
+ text-align: center;
0
+ padding: 5px 5px 20px 5px;
0
+ border-bottom: 1px dotted #ccc;
0
+}
0
+
0
+#themelist img {
0
+ width: 125px;
0
+ height: 125px;
0
+ background: #fff;
0
+ padding: 3px;
0
+ border: 2px solid #aaa;
0
+}
0
+
0
+.thememeta {
0
+ display: block;
0
+ font-weight: normal;
0
+ font-size: 90%;
0
+ color: #777;
0
+}
0
+
0
+#themelist .tools {
0
+ position: absolute;
0
+ bottom: -100px;
0
+ left: 30%;
0
+ text-align: left;
0
+ z-index: 9999;
0
+ padding: 0 3px 3px 0;
0
+ width: 150px;
0
+ background: url(/images/mephisto/shadow.png) bottom right no-repeat;
0
+}
0
+
0
+#themelist .tools ul {
0
+ border: 4px solid #fff;
0
+ background: #eee;
0
+}
0
+
0
+#themelist .tools a {
0
+ display: block;
0
+ border-bottom: 1px solid #fff;
0
+ padding: 5px;
0
+ width: 130px;
0
+ color: #555;
0
+}
0
+
0
+#themelist .tools a:hover {
0
+ color: #333;
0
+}
0
+
0
+#inuse img {
0
+ background: #eff;
0
+ border: 2px solid #7bb;
0
+}
0
+
0
+
0
+/*------------------------------------------------------------------------
0
  *=MISC
0
- */
0
+ ------------------------------------------------------------------------*/
0
+
0
 
0
 cite {
0
   font-style: normal;
0
@@ -1499,7 +1576,6 @@ ul.nobull li label {
0
 
0
 
0
 
0
-
0
 /*
0
  *=ERRORS AND NOTICES
0
  */

Comments

    No one has commented yet.