Changeset 1442
- Timestamp:
- 03/08/08 15:52:07 (9 months ago)
- Location:
- branches/monolith/system/admin
- Files:
-
- 3 modified
-
css/admin.css (modified) (3 diffs)
-
js/media.js (modified) (7 diffs)
-
publish.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/monolith/system/admin/css/admin.css
r1419 r1442 1 /* @override 2 http://localhost/monolith/system/admin/css/admin.css 3 */ 1 /* @override http://localhost/monolith/system/admin/css/admin.css */ 4 2 5 3 /* … … 484 482 } 485 483 486 /* Media */ 487 488 .media { 489 display: inline; 490 float: left; 491 height: 180px; 492 font-size: 0.9em; 493 } 494 495 .media img { 496 margin:0px 0px -3px; 497 height:100px; 498 border-top: 1px solid white; 499 border-right: 1px solid white; 484 485 /* MEDIA SILOS */ 486 487 .mediasplitter { 500 488 border-bottom: 1px solid white; 501 cursor: pointer; 502 } 503 504 .media.first img { 505 border-left: 1px solid white; 506 } 507 508 .media .foroutput { 509 display: none; 510 } 489 } 511 490 512 491 .mediasplitter .splitterinside { 513 492 padding: 13px 0px 0px; 514 493 color: #848484; 515 } 516 517 .mediatitle { 518 padding: 3px; 519 height: 30px; 520 background: #333333 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAA8CAMAAAB/yBzfAAAAA3NCSVQICAjb4U/gAAAAb1BMVEU7Ozs6Ojo5OTk1NTU0NDQyNDEzMzMyMzUyMjIxMzIxMTEwMDAvLy8uLi4tLS0sLCwrKysqKiopKSkoKCgnJycmJiYlJSUkJCQjIyMiIiIhISEgICAfHx8eHh4dHR0cHBwbGxsaGhoZGRkYGBgXFxeooJonAAAACXBIWXMAAAsSAAALEgHS3X78AAAAGHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3NPsx9OAAAAFnRFWHRDcmVhdGlvbiBUaW1lADAxLzEyLzA4IRiF3QAAAP5JREFUeJzt00kOgkAAAMFRE2MgCi64oOLG/98og7icPE760PWFToeLkrtGt949egzatj2FnZLbdw5RXdfHznnQNM0qLJXaKlq/bbdDol4e5kpt8SMG6qpselVVTcJMqWVR/hKjlGX5WWccpkrtWyXL4jFFUZRvI4Ok9y9IMEh6BoExCIxBYAwCYxAYg8AYBMYgMAaBMQiMQWAMAmMQGIPAGATGIDAGgTEIjEFgDAJjEBiDwBgExiAwBoExCIxBYAwCYxAYg8AYBMYgMAaBMQiMQWAMAmMQGIPAGATGIDAGgTEIjEFgDAJjEBiDwBgExiAwBoExCIxBYAwC8zfIE1yTu6lWZRyRAAAAAElFTkSuQmCC) top right; /* Drop shadow */ 521 } 522 523 .mediastats { 524 padding: 3px; 525 height: 42px; 526 background: #333333 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAA8CAMAAAB/yBzfAAAAA3NCSVQICAjb4U/gAAAAb1BMVEU7Ozs6Ojo5OTk1NTU0NDQyNDEzMzMyMzUyMjIxMzIxMTEwMDAvLy8uLi4tLS0sLCwrKysqKiopKSkoKCgnJycmJiYlJSUkJCQjIyMiIiIhISEgICAfHx8eHh4dHR0cHBwbGxsaGhoZGRkYGBgXFxeooJonAAAACXBIWXMAAAsSAAALEgHS3X78AAAAGHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3NPsx9OAAAAFnRFWHRDcmVhdGlvbiBUaW1lADAxLzEyLzA4IRiF3QAAAP5JREFUeJzt00kOgkAAAMFRE2MgCi64oOLG/98og7icPE760PWFToeLkrtGt949egzatj2FnZLbdw5RXdfHznnQNM0qLJXaKlq/bbdDol4e5kpt8SMG6qpselVVTcJMqWVR/hKjlGX5WWccpkrtWyXL4jFFUZRvI4Ok9y9IMEh6BoExCIxBYAwCYxAYg8AYBMYgMAaBMQiMQWAMAmMQGIPAGATGIDAGgTEIjEFgDAJjEBiDwBgExiAwBoExCIxBYAwCYxAYg8AYBMYgMAaBMQiMQWAMAmMQGIPAGATGIDAGgTEIjEFgDAJjEBiDwBgExiAwBoExCIxBYAwC8zfIE1yTu6lWZRyRAAAAAElFTkSuQmCC) top right; /* Drop shadow */ 527 } 528 529 .splitter.mediasplitter { 530 background: #333333 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAuCAIAAAB8sQSzAAAAW0lEQVR4nO3VMRIAIQhD0WUF9BDW3v+CDl7hFymhfpMiRbBzzgfOIwK5zJS6OSdyay1pHnW0F+rcHbkxhtSZmdL9BLVr107ivKqk7t6rdLb3Rnl0x+n/oHsK3QNrcA5DpDiz3gAAAABJRU5ErkJggg==) top repeat-x; /* Drop shadow */ 531 532 } 494 padding: 0; 495 background: #262626; 496 } 497 498 .mediasplitter td { 499 padding: 0; 500 } 501 502 /* -- TOOLBAR */ 533 503 534 504 .media_controls { 535 height: 28px; 536 text-align: center; 505 background: #474747 url('../images/shadow-heavy-top.png') top repeat-x; 506 padding: 15px 5px 5px; 507 height: 25px; 537 508 } 538 509 … … 551 522 } 552 523 553 .media_browser td { 554 padding: 0px; 555 border: 0px; 524 .media_controls input[type=search] { 525 width: 270px; 526 margin-left: 5px; 527 } 528 529 /* -- MEDIABROWSER */ 530 531 .media_browser { 532 height: 195px; 533 overflow-x: scroll; 534 overflow-y: hidden; 535 position: relative; 536 background: url('../images/shadow-light-top.png') top right repeat-x; /* Drop shadow */ 537 } 538 539 /* -- DIRECTORIES */ 540 541 .media_dirlevel { 542 float: left; 543 height: inherit; 544 overflow-y: auto; 545 overflow-x: hidden; 546 background: url('../images/shadow-light-left.png') repeat-y; 547 height: 180px; 556 548 } 557 549 558 .mediadir { 559 height:180px; 560 float:left; 561 } 562 563 .mediadir a { 564 color:#a6a6a6; 565 padding: 0px 20px 0px 5px; 566 background: transparent url(../images/media_arrow.png) scroll no-repeat center right; 567 outline: none; 568 display: block; 569 margin-right: 1px; 570 text-decoration: none; 550 .media_dirlevel ul { 551 max-width: 250px; 552 list-style-position: outside; 553 list-style-type: none; 554 } 555 556 .media_dirlevel:first-child { 557 background: #262626; 558 } 559 560 .media_dirlevel li { 561 min-width: 70px; 562 background: url(../images/arrowright.png) right center no-repeat; 563 cursor: pointer; 564 color: #888; 565 padding: 0px 15px 0px 10px; 566 font: 11px/20px 'Helvetica Neue Light', 'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, Sans-Serif !important; 567 white-space: nowrap; 568 text-overflow: ellipsis; 569 overflow: hidden; 570 } 571 572 .media_dirlevel li:first-child { 573 margin-top: 1px; 574 } 575 576 .media_dirlevel li:hover, .media_dirlevel li.active { 577 background: #333 url(../images/arrowright.png) right center no-repeat; 578 } 579 580 .media_dirlevel li.active { 581 color: white; 582 } 583 584 /* -- MEDIA LISTING */ 585 586 .mediaphotos { 587 display: table; 588 } 589 590 .mediaphotos ul { 591 display: table-row; 592 } 593 594 .mediaphotos ul li { 595 display: table-cell; 596 } 597 598 .mediaphotos .media { 599 position: relative; 600 display: inline; 601 float: left; 602 height: inherit; 603 font-size: 0.9em; 604 } 605 606 .mediaphotos .media.first div { 607 background: url('../images/shadow-light-left.png') left repeat-y; 608 } 609 610 .media .foroutput { 611 display: none; 612 } 613 614 .media > div { 615 border-right: 1px solid #333; 616 } 617 618 .mediatitle { 619 padding: 0 5px; 620 line-height: 35px; 571 621 white-space: nowrap; 572 622 overflow: hidden; 573 } 574 575 .mediadir a.active { 576 background-color: #5B5B5B; 577 background: #5B5B5B url(../images/media_arrow_active.png) scroll no-repeat center right; 578 color: #e8e8e8; 579 } 580 581 .media_dirlevel { 582 float: left; 583 height: 197px; 584 overflow-y: auto; 585 } 586 587 .media_panel { 588 height: 197px; 589 display: none; 590 } 591 592 593 623 text-overflow: ellipsis; 624 } 625 626 .mediacontent { 627 background: red url('../images/silo-mediabg.png'); 628 } 629 630 .media img { 631 margin: 0 0 -3px; 632 height: 100px; 633 border: 1px solid white; 634 border-left: none; 635 cursor: pointer; 636 max-width: 300px; 637 min-width: 20px; 638 } 639 640 .media.first img { 641 border-left: 1px solid white; 642 } 643 644 .mediastats { 645 padding: 3px; 646 height: 42px; 647 } 594 648 595 649 /* DASHBOARD */ -
branches/monolith/system/admin/js/media.js
r1393 r1442 4 4 $('.media_browser', container).show(); 5 5 $('.media_panel', container).hide(); 6 if(!el && !container) { 6 7 if (!el && !container) 7 8 container = $('.mediasplitter:visible'); 8 } 9 if (el && !container) {9 10 if (el && !container) 10 11 container = $(el).parents('.mediasplitter'); 11 } 12 if ($('.pathstore', container).html() != path || $('.pathstore.toload', container).size()) {12 13 if ($('.pathstore', container).html() != path || $('.pathstore.toload', container).size()) { 13 14 $.post( 14 15 habari.url.habari + '/admin_ajax/media', … … 17 18 }, 18 19 function(result) { 20 var mediaDirChildren = $('.mediadir').children().length; 21 19 22 habari.media.unqueueLoad(); 20 23 $('.pathstore', container).html(result.path); 21 var output = '<div class="media_dirlevel"><table>'; 22 for(var dir in result.dirs) { 23 output += '<tr><td><a class="directory" href="#" onclick="return habari.media.clickdir(this, \'' + result.dirs[dir].path + '\');">' + result.dirs[dir].title + '</a></td></tr>'; 24 var output = '<li class="media_dirlevel"><ul>'; 25 26 // Build path 27 for (var dir in result.dirs) { 28 output += '<li onclick="return habari.media.clickdir(this, \'' + result.dirs[dir].path + '\');" class="directory">' + result.dirs[dir].title + '</li>'; 24 29 } 25 output += '</table></div>'; 26 if(el) { 30 31 output += '</ul></li>'; 32 33 // If path changed 34 if (el) { 27 35 $($(el).parents('.media_dirlevel')).nextAll().remove(); 28 $( '.directory', $(el).parents('.media_dirlevel')).removeClass('active');36 $(el).siblings().removeClass('active') 29 37 $(el).addClass('active'); 30 38 $(el).parents('.media_dirlevel').after(output); 31 } 32 else if($('.mediadir', container).html() == '') { 39 } else if ($('.mediadir', container).html() == '') { 33 40 $('.mediadir', container).html(output); 34 41 } 35 output = '<table><tr>'; 42 43 // Build Media List 44 output = '<ul>'; 36 45 var first = ' first'; 37 46 habari.media.assets = result.files; 38 for(var file in result.files) { 47 48 for (var file in result.files) { 39 49 stats = ''; 40 output += '< td><div class="media' + first + '"><span class="foroutput">' + file + '</span>';50 output += '<li><div class="media' + first + '"><span class="foroutput">' + file + '</span>'; 41 51 42 if (result.files[file].filetype && habari.media.preview[result.files[file].filetype]) {52 if (result.files[file].filetype && habari.media.preview[result.files[file].filetype]) { 43 53 output += habari.media.preview[result.files[file].filetype](file, result.files[file]); 44 54 } … … 47 57 } 48 58 49 output += '</div></ td>';59 output += '</div></li>'; 50 60 first = ''; 51 61 } 52 output += '</tr></table>'; 62 63 output += '</ul>'; 64 53 65 $('.mediaphotos', container).html(output); 54 66 $('.media').dblclick(function(){ … … 57 69 $('.media_controls ul li:first', container).nextAll().remove(); 58 70 $('.media_controls ul li:first', container).after(result.controls); 71 72 // Open the first directory automatically 73 if (mediaDirChildren == 0) 74 $('.media_dirlevel:first-child li:first-child').click() 59 75 }, 60 76 'json' … … 102 118 image: function(fileindex, fileobj) { 103 119 var stats = ''; 104 return '<div class="mediatitle"> ' + fileobj.title + '</div><img src="' + fileobj.thumbnail_url + '"><div class="mediastats">' + stats + '</div>';120 return '<div class="mediatitle">test' + fileobj.title + '</div><div class="mediacontent"><img src="' + fileobj.thumbnail_url + '"></div><div class="mediastats">qwerqr123 ' + stats + '</div>'; 105 121 } 106 122 }, … … 118 134 insertAsset: function(asset) { 119 135 var id = $('.foroutput', asset).html(); 120 if (this.assets[id].filetype && habari.media.output[this.assets[id].filetype]) {136 if (this.assets[id].filetype && habari.media.output[this.assets[id].filetype]) { 121 137 habari.media.output[this.assets[id].filetype](id, this.assets[id]); 122 138 } … … 135 151 show: function(clicked, shown, hidden){ 136 152 var path = $('.pathstore', shown).html().trim(); 137 if (path != '') {153 if (path != '') { 138 154 habari.media.showdir(path, null, shown); 139 155 habari.media.unqueueLoad(); -
branches/monolith/system/admin/publish.php
r1419 r1442 38 38 <div class="toload pathstore" style="display:none;"><?php echo $silodir->path; ?></div> 39 39 <div class="splitterinside"> 40 <div class="media_controls"><ul><li><a href="#" onclick="habari.media.showdir('<?php echo $silodir->path; ?>');return false;">Root</a></li></ul></div> 41 <div style="white-space:nowrap;overflow-x:scroll;overflow-y:hidden;" class="media_browser"> 42 <div class="mediadir"></div> 40 <div class="media_controls"><ul> 41 <li><input type="search" placeholder="Search descriptions, names and tags" autosave="habarisettings" results="10"></input></li> 42 <li><a href="#" onclick="habari.media.showdir('<?php echo $silodir->path; ?>');return false;">Root</a></li> 43 </ul></div> 44 <div class="media_browser"> 45 <ul class="mediadir"></ul> 43 46 <div class="mediaphotos"></div> 44 47 </div>
