1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 02:09:23 +02:00

Add responsive elements for tables and fix code style

This commit is contained in:
Afterster 2014-03-15 10:19:59 +01:00
parent b7e0966007
commit ea815a1ff1
26 changed files with 258 additions and 124 deletions

View file

@ -88,9 +88,11 @@ Ampache includes some external modules that carry their own licensing.
* [Ratchet] (http://socketo.me): MIT
* [ReactPHP] (https://github.com/reactphp/react): MIT
* [Guzzle] (https://github.com/guzzle/guzzle): MIT
* [Symfony Components] (https://github.com/symfony/): MIT
* [Symfony Components] (https://github.com/symfony): MIT
* [Evenement] (https://github.com/igorw/evenement): MIT
* [RhinoSlider] (http://rhinoslider.com/): MIT
* [RhinoSlider] (http://rhinoslider.com): MIT
* [MediaTable] (https://github.com/edenspiekermann/MediaTable): MIT
* [Responsive Elements] (https://github.com/kumailht/responsive-elements): MIT
Translations

View file

@ -290,7 +290,7 @@ class Artist extends database_object
$this->tags = Tag::get_top_tags('artist', $this->id);
$this->f_tags = Tag::get_display($this->tags, $this->id, 'artist');
$this->object_cnt = $extra_info['object_cnt'];
return true;

View file

@ -204,7 +204,7 @@ abstract class Catalog extends database_object
{
$pattern = "/\.(" . AmpConfig::get('catalog_file_pattern') . ")$/i";
$match = preg_match($pattern, $file);
return $match;
}
@ -213,7 +213,7 @@ abstract class Catalog extends database_object
$video_pattern = "/\.(" . AmpConfig::get('catalog_video_pattern') . ")$/i";
return preg_match($video_pattern, $file);
}
public static function is_playlist_file($file)
{
$playlist_pattern = "/\.(" . AmpConfig::get('catalog_playlist_pattern') . ")$/i";
@ -1050,7 +1050,7 @@ abstract class Catalog extends database_object
return $title;
} // check_title
/**
* playlist_import
* Attempts to create a Public Playlist based on the playlist file
@ -1067,7 +1067,7 @@ abstract class Catalog extends database_object
} elseif (substr($playlist, -4,4) == 'xspf') {
$files = self::parse_xspf($data);
}
$songs = array();
$pinfo = pathinfo($playlist);
if ($files) {
@ -1097,7 +1097,7 @@ abstract class Catalog extends database_object
}
}
debug_event('catalog', 'Add file ' . $file . ' to playlist.', '5');
// First, try to found the file as absolute path
$sql = "SELECT `id` FROM `song` WHERE `file` = ?";
$db_results = Dba::read($sql, array($file));
@ -1124,9 +1124,9 @@ abstract class Catalog extends database_object
} // if it's a file
}
}
debug_event('import_playlist', "Parsed " . $filename . ", found " . count($songs) . " songs", 5);
if (count($songs)) {
$name = $pinfo['extension'] . " - " . $pinfo['filename'];
$playlist_id = Playlist::create($name, 'public');
@ -1163,7 +1163,7 @@ abstract class Catalog extends database_object
{
$files = array();
$results = explode("\n", $data);
foreach ($results as $value) {
$value = trim($value);
if (!empty($value) && substr($value, 0, 1) != '#') {
@ -1173,7 +1173,7 @@ abstract class Catalog extends database_object
return $files;
} // parse_m3u
/**
* parse_pls
* this takes pls filename and then attempts to found song filenames listed in the pls
@ -1182,7 +1182,7 @@ abstract class Catalog extends database_object
{
$files = array();
$results = explode("\n", $data);
foreach ($results as $value) {
$value = trim($value);
if (preg_match("/file[0-9]+[\s]*\=(.*)/i", $value, $matches)) {
@ -1195,7 +1195,7 @@ abstract class Catalog extends database_object
return $files;
} // parse_pls
/**
* parse_asx
* this takes asx filename and then attempts to found song filenames listed in the asx
@ -1204,7 +1204,7 @@ abstract class Catalog extends database_object
{
$files = array();
$xml = simplexml_load_string($data);
if ($xml) {
foreach ($xml->entry as $entry) {
$file = trim($entry->ref['href']);
@ -1216,7 +1216,7 @@ abstract class Catalog extends database_object
return $files;
} // parse_asx
/**
* parse_xspf
* this takes xspf filename and then attempts to found song filenames listed in the xspf

View file

@ -390,7 +390,7 @@ class Plex_Api
}
return strlen($header);
}
public static function replay_body($ch, $data)
{
echo $data;
@ -499,11 +499,11 @@ class Plex_Api
$width = $_REQUEST['width'];
$height = $_REQUEST['height'];
$url = $_REQUEST['url'];
// Replace 32400 request port with the real listening port
// *** To `Plex Inc`: ***
// Please allow listening port server configuration for your Plex server
// and fix your clients to not request resources so hard-coded on 127.0.0.1:32400.
// and fix your clients to not request resources so hard-coded on 127.0.0.1:32400.
// May be ok on Apple & UPnP world but that's really ugly for a server...
// Yes, it's a little hack but it works.
$localrs = "http://127.0.0.1:32400/";
@ -547,13 +547,13 @@ class Plex_Api
$song_id = Plex_XML_Data::getAmpacheId($matches[1]);
}
}
if (!empty($format) && !empty($song_id)) {
$urlparams = '&transcode_to=' . $format;
if (!empty($br)) {
$urlparams .= '&bitrate=' . $br;
}
$url = Song::play_url($song_id, $urlparams);
self::stream_url($url);
}
@ -678,11 +678,12 @@ class Plex_Api
Plex_XML_Data::setContainerSize($r);
self::apiOutput($r->asXML());
}
protected static function stream_url($url) {
protected static function stream_url($url)
{
// header("Location: " . $url);
set_time_limit(0);
$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_HTTPHEADER => array("User-Agent: Plex"),
@ -953,13 +954,13 @@ class Plex_Api
}
}
}
protected static function get_users_account($authtoken='')
{
if (empty($authtoken)) {
$authtoken = Plex_XML_Data::getMyPlexAuthToken();
}
$action = 'users/account?auth_token=' . $authtoken;
$res = self::myPlexRequest($action);
return $res['xml'];

View file

@ -71,7 +71,7 @@ class Recommendation
protected static function get_recommendation_cache($type, $id, $get_items = false)
{
self::gc();
$sql = "SELECT `id`, `last_update` FROM `recommendation` WHERE `object_type` = ? AND `object_id` = ?";
$db_results = Dba::read($sql, array($type, $id));

View file

@ -353,7 +353,7 @@ class Search extends playlist_object
'type' => 'boolean_numeric',
'widget' => array('select', $playlists)
);
$this->types[] = array(
'name' => 'playlist_name',
'label' => T_('Playlist Name'),
@ -1031,7 +1031,7 @@ class Search extends playlist_object
case 'rating':
$where[] = "COALESCE(`rating`.`rating`,0) $sql_match_operator '$input'";
$join['rating'] = true;
break;
break;
case 'played_times':
$where[] = "`song`.`id` IN (SELECT `object_count`.`object_id` FROM `object_count` " .
"WHERE `object_count`.`object_type` = 'song'" .
@ -1206,7 +1206,7 @@ class Search extends playlist_object
$sql_match_operator = $operator['sql'];
$where[] = "`playlist`.`type` = 'public'";
switch ($rule[0]) {
case 'name':
$where[] = "`playlist`.`name` $sql_match_operator '$input'";
@ -1222,7 +1222,7 @@ class Search extends playlist_object
$join['catalog'] = true;
$where_sql = implode(" $sql_logic_operator ", $where);
if ($join['playlist_data']) {
$table['playlist_data'] = "LEFT JOIN `playlist_data` ON `playlist_data`.`playlist` = `playlist`.`id`";
}

View file

@ -50,7 +50,7 @@ class Slideshow
debug_event('echonest', 'EchoNest artist images error: ' . $e->getMessage(), '1');
}
}
foreach (Plugin::get_plugins('get_photos') as $plugin_name) {
$plugin = new Plugin($plugin_name);
if ($plugin->load($GLOBALS['user'])) {

View file

@ -96,7 +96,7 @@ class Tag extends database_object
$sql = "SELECT `tag_map`.`id`,`tag_map`.`tag_id`, `tag`.`name`,`tag_map`.`object_id`,`tag_map`.`user` FROM `tag` " .
"LEFT JOIN `tag_map` ON `tag_map`.`tag_id`=`tag`.`id` " .
"WHERE `tag_map`.`object_type`='$type' AND `tag_map`.`object_id` IN $idlist";
$db_results = Dba::read($sql);
$tags = array();
@ -177,7 +177,7 @@ class Tag extends database_object
return $insert_id;
} // add_tag
/**
* update
* Update the name of the tag
@ -188,7 +188,7 @@ class Tag extends database_object
if (!strlen($name)) { return false; }
$name = Dba::escape($name);
$sql = 'UPDATE `tag` SET `name` = ? WHERE `id` = ?';
Dba::write($sql, array($name, $this->id));
@ -247,7 +247,7 @@ class Tag extends database_object
"WHERE `tag_map`.`id` IS NULL";
$db_results = Dba::write($sql);
}
/**
* delete
*
@ -257,13 +257,13 @@ class Tag extends database_object
{
$sql = "DELETE FROM `tag_map` WHERE `tag_map`.`tag_id`='".$this->id."'";
$db_results = Dba::write($sql);
$sql = "DELETE FROM `tag` WHERE `tag`.`id`='".$this->id."'";
$db_results = Dba::write($sql);
// Call the garbage collector to clean everything
Tag::gc();
parent::clear_cache();
}
@ -362,7 +362,7 @@ class Tag extends database_object
while ($row = Dba::fetch_assoc($db_results)) {
$results[] = $row;
}
return $results;
} // get_object_tags
@ -408,16 +408,16 @@ class Tag extends database_object
}
$results = array();
$sql = "SELECT `tag_map`.`tag_id`, `tag`.`name`, COUNT(`tag_map`.`object_id`) AS `count` " .
"FROM `tag_map` " .
"LEFT JOIN `tag` ON `tag`.`id`=`tag_map`.`tag_id` " .
"GROUP BY `tag`.`name` ORDER BY `count` DESC ";
if ($limit > 0) {
$sql .= " LIMIT $limit";
}
$db_results = Dba::read($sql);
while ($row = Dba::fetch_assoc($db_results)) {
@ -558,5 +558,5 @@ class Tag extends database_object
return false;
} // validate_type
} // end of Tag class

View file

@ -378,10 +378,10 @@ class Update
$update_string = '- Add artist description/recommendation external service data cache.<br />';
$version[] = array('version' => '360044','description' => $update_string);
$update_string = '- Set user field on playlists as optional.<br />';
$version[] = array('version' => '360045','description' => $update_string);
$update_string = '- Add broadcast web player by default preference.<br />';
$version[] = array('version' => '360046','description' => $update_string);
@ -2287,7 +2287,7 @@ class Update
return true;
}
/**
* update_360045
*
@ -2300,7 +2300,7 @@ class Update
return true;
}
/**
* update_360046
*

View file

@ -33,12 +33,12 @@ function log_event($username, $event_name, $event_description, $log_name)
/* must have some name */
$log_name = $log_name ? $log_name : 'ampache';
$username = $username ? $username : 'ampache';
$log_filename = AmpConfig::get('log_filename');
if (empty($log_filename)) {
$log_filename = "%name.%Y%m%d.log";
}
$log_filename = str_replace("%name", $log_name, $log_filename);
$log_filename = str_replace("%Y", date('Y'), $log_filename);
$log_filename = str_replace("%m", date('m'), $log_filename);

View file

@ -303,7 +303,7 @@ class Catalog_local extends Catalog
if (AmpConfig::get('catalog_video_pattern')) {
$is_video_file = Catalog::is_video_file($file);
}
if ($options['parse_playlist'] && AmpConfig::get('catalog_playlist_pattern')) {
$is_playlist = Catalog::is_playlist_file($file);
}

View file

@ -86,37 +86,13 @@ http://www.consulenza-web.com/2012/01/mediatable-jquery-plugin/
/* -----[[ B R E A C K P O I N T S ]]------------ */
@media screen and (min-width: 768px) {
.activeMediaTable th.optional, .activeMediaTable td.optional {
display: table-cell;
_display:block; /* IE6 Hack */
}
/* IE7 Hack */
*+html .activeMediaTable th.optional, *+html .activeMediaTable td.optional { display:block }
.mediaTableWrapper.gt500 th.optional, .mediaTableWrapper.gt500 td.optional {
display: table-cell;
}
@media screen and (min-width: 1024px) {
.activeMediaTable th, .activeMediaTable td {
display: table-cell;
_display:block; /* IE6 Hack */
}
/* IE7 Hack */
*+html .activeMediaTable th, *+html .activeMediaTable td { display:block }
.mediaTableWrapper.gt700 th, .mediaTableWrapper.gt700 td {
display: table-cell;
}
/* -----[[ T H E M I N G ]]------------ */
/**

View file

@ -71,6 +71,7 @@ http://www.consulenza-web.com/2012/01/mediatable-jquery-plugin/
// Create the wrapper.
wdg.$wrap.addClass('mediaTableWrapper');
wdg.$wrap.attr('data-respond', '');
// Place the wrapper near the table and fill with MediaTable.
wdg.$table.before(wdg.$wrap).appendTo(wdg.$wrap);

View file

@ -0,0 +1,153 @@
//
// Responsive Elements
// Copyright (c) 2013 Kumail Hunaid
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
var ResponsiveElements = {
elementsAttributeName: 'data-respond',
maxRefreshRate: 5,
defaults: {
// How soon should you start adding breakpoints
start: 100,
// When to stop adding breakpoints
end: 900,
// At what interval should breakpoints be added?
interval: 50
},
init: function() {
var self = this;
$(function() {
self.el = {
window: $(window),
responsive_elements: $('[' + self.elementsAttributeName + ']')
};
self.events();
});
},
parseOptions: function(options_string) {
// data-respond="start: 100px; end: 900px; interval: 50px; watch: true;"
if (!options_string) return false;
this._options_cache = this._options_cache || {};
if (this._options_cache[options_string]) return this._options_cache[options_string];
var options_array = options_string.replace(/\s+/g, '').split(';'),
options_object = {};
for (var i = 0; i < options_array.length; i++) {
if (!options_array[i]) continue;
var property_array = (options_array[i]).split(':');
var key = property_array[0];
var value = property_array[1];
if (value.slice(-2) === 'px') {
value = value.replace('px', '');
}
if (!isNaN(value)) {
value = parseInt(value, 10);
}
options_object[key] = value;
}
this._options_cache[options_string] = options_object;
return options_object;
},
generateBreakpointsOnAllElements: function() {
var self = ResponsiveElements;
self.el.responsive_elements.each(function(i, _el) {
self.generateBreakpointsOnElement($(_el));
});
},
generateBreakpointsOnElement: function(_el) {
var options_string = _el.attr(this.elementsAttributeName),
options = this.parseOptions(options_string) || this.defaults,
breakpoints = this.generateBreakpoints(_el.width(), options);
this.cleanUpBreakpoints(_el);
_el.addClass(breakpoints.join(' '));
},
generateBreakpoints: function(width, options) {
var start = options.start,
end = options.end,
interval = options.interval,
i = interval > start ? interval : ~~(start / interval) * interval,
classes = [];
while (i <= end) {
if (i < width) classes.push('gt' + i);
if (i > width) classes.push('lt' + i);
if (i == width) classes.push('lt' + i);
i += interval;
}
return classes;
},
parseBreakpointClasses: function(breakpoints_string) {
var classes = breakpoints_string.split(/\s+/),
breakpointClasses = [];
$(classes).each(function(i, className) {
if (className.match(/^gt\d+|lt\d+$/)) breakpointClasses.push(className);
});
return breakpointClasses;
},
cleanUpBreakpoints: function(_el) {
var classesToCleanup = this.parseBreakpointClasses(_el.attr('class') || '');
_el.removeClass(classesToCleanup.join(' '));
},
events: function() {
this.generateBreakpointsOnAllElements();
this.el.window.bind('resize', this.utils.debounce(
this.generateBreakpointsOnAllElements, this.maxRefreshRate));
},
utils: {
// Debounce is part of Underscore.js 1.5.2 http://underscorejs.org
// (c) 2009-2013 Jeremy Ashkenas. Distributed under the MIT license.
debounce: function(func, wait, immediate) {
// Returns a function, that, as long as it continues to be invoked,
// will not be triggered. The function will be called after it stops
// being called for N milliseconds. If `immediate` is passed,
// trigger the function on the leading edge, instead of the trailing.
var result;
var timeout = null;
return function() {
var context = this,
args = arguments;
var later = function() {
timeout = null;
if (!immediate) result = func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) result = func.apply(context, args);
return result;
};
}
}
};
ResponsiveElements.init();

View file

@ -98,7 +98,7 @@ switch ($_REQUEST['action']) {
/* Controls the editing of objects */
case 'edit_object':
debug_event('ajax_server', "Editing object...", '5');
// Scrub the data
foreach ($_POST as $key => $data) {
$_POST[$key] = unhtmlentities(scrub_in($data));
@ -315,21 +315,21 @@ switch ($_REQUEST['action']) {
$results[$key] = ob_get_contents();
ob_end_clean();
break;
case 'action_buttons':
ob_start();
if (AmpConfig::get('ratings')) {
echo " <div id='rating_" . $_GET['object_id'] . "_" . $_GET['object_type'] . "'>";
Rating::show($_GET['object_id'], $_GET['object_type']);
echo "</div>";
}
if (AmpConfig::get('userflags')) {
echo " <div id='userflag_" . $_GET['object_id'] . "_" . $_GET['object_type'] . "'>";
Userflag::show($_GET['object_id'], $_GET['object_type']);
echo "</div>";
}
case 'action_buttons':
ob_start();
if (AmpConfig::get('ratings')) {
echo " <div id='rating_" . $_GET['object_id'] . "_" . $_GET['object_type'] . "'>";
Rating::show($_GET['object_id'], $_GET['object_type']);
echo "</div>";
}
if (AmpConfig::get('userflags')) {
echo " <div id='userflag_" . $_GET['object_id'] . "_" . $_GET['object_type'] . "'>";
Userflag::show($_GET['object_id'], $_GET['object_type']);
echo "</div>";
}
$results['action_buttons'] = ob_get_contents();
ob_end_clean();
break;
break;
default:
$results['rfc3514'] = '0x1';
break;

View file

@ -116,7 +116,7 @@ switch ($_REQUEST['action']) {
);
}
}
if ($target == 'anywhere' || $target == 'playlist') {
$searchreq = array(
'limit' => $limit,

View file

@ -48,7 +48,7 @@ switch ($_REQUEST['action']) {
ob_start();
$type = $_REQUEST['object_type'];
$id = $_REQUEST['object_id'];
if ($type == "song") {
$media = new Song($id);
$shouts = Shoutbox::get_shouts($type, $id);

View file

@ -53,6 +53,7 @@ if (AmpConfig::get('use_rss')) { ?>
<script src="<?php echo $web_path; ?>/modules/jscroll/jquery.jscroll.min.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/modules/jquery/jquery.qrcode.min.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/modules/rhinoslider/js/rhinoslider-1.05.min.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/modules/responsive-elements/responsive-elements.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/modules/jquery-mediaTable/jquery.mediaTable.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/lib/javascript/base.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/lib/javascript/ajax.js" language="javascript" type="text/javascript"></script>
@ -158,11 +159,11 @@ function init_slideshow_check()
}
function swap_slideshow()
{
if (iSlideshow == null) {
init_slideshow_refresh();
} else {
stop_slideshow();
}
if (iSlideshow == null) {
init_slideshow_refresh();
} else {
stop_slideshow();
}
}
function init_slideshow_refresh()
{
@ -189,7 +190,7 @@ function refresh_slideshow()
}
function stop_slideshow()
{
if (iSlideshow != null) {
if (iSlideshow != null) {
iSlideshow = null;
$("#aslideshow").css({'display': 'none'});
}

View file

@ -23,7 +23,7 @@
$web_path = AmpConfig::get('web_path');
$thcount = 8;
?>
<script type="text/javascript">
<script type="text/javascript">
setTagsChoices('<?php echo Tag::get_display(Tag::get_tags()); ?>');
</script>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>

View file

@ -25,27 +25,27 @@ session_start();
$web_path = AmpConfig::get('web_path');
$thcount = 8;
?>
<script type="text/javascript">
<script type="text/javascript">
setTagsChoices('<?php echo Tag::get_display(Tag::get_tags()); ?>');
</script>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<table class="tabledata" cellpadding="0" cellspacing="0">
<thead>
<tr class="th-top">
<th class="cel_play"></th>
<th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=artist&sort=name', T_('Artist'),'artist_sort_name'); ?></th>
<th class="cel_add"></th>
<th class="cel_songs"><?php echo T_('Songs'); ?></th>
<th class="cel_albums"><?php echo T_('Albums'); ?></th>
<th class="cel_time"><?php echo T_('Time'); ?></th>
<th class="cel_tags"><?php echo T_('Tags'); ?></th>
<th class="cel_play essential"></th>
<th class="cel_artist essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=artist&sort=name', T_('Artist'),'artist_sort_name'); ?></th>
<th class="cel_add essential"></th>
<th class="cel_songs optional"><?php echo T_('Songs'); ?></th>
<th class="cel_albums optional"><?php echo T_('Albums'); ?></th>
<th class="cel_time optional"><?php echo T_('Time'); ?></th>
<th class="cel_tags optional"><?php echo T_('Tags'); ?></th>
<?php if (AmpConfig::get('ratings')) { ++$thcount; ?>
<th class="cel_rating"><?php echo T_('Rating'); ?></th>
<th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
<?php } ?>
<?php if (AmpConfig::get('userflags')) { ++$thcount; ?>
<th class="cel_userflag"><?php echo T_('Flag'); ?></th>
<th class="cel_userflag optional"><?php echo T_('Flag'); ?></th>
<?php } ?>
<th class="cel_action"><?php echo T_('Action'); ?></th>
<th class="cel_action essential"><?php echo T_('Action'); ?></th>
</tr>
</thead>
<tbody>

View file

@ -21,7 +21,7 @@
*/
?>
<script type="text/javascript">
<script type="text/javascript">
setTagsChoices('<?php echo Tag::get_display(Tag::get_tags()); ?>');
</script>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php' ?>

View file

@ -21,7 +21,7 @@
*/
?>
<script type="text/javascript">
<script type="text/javascript">
setTagsChoices('<?php echo Tag::get_display(Tag::get_tags()); ?>');
</script>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php' ?>

View file

@ -26,7 +26,7 @@ require_once AmpConfig::get('prefix') . '/templates/stylesheets.inc.php';
<script type="text/javascript" charset="utf-8">
var jsAjaxServer = "<?php echo AmpConfig::get('ajax_server') ?>";
var jsAjaxUrl = "<?php echo AmpConfig::get('ajax_url') ?>";
function update_action() { }
</script>
<?php
@ -154,9 +154,9 @@ if ($isVideo) {
}
currentjpitem = currenti;
<?php if ($iframed) { ?>
if (previousartist != currentjpitem.attr("data-artist_id")) {
NotifyOfNewSong();
}
if (previousartist != currentjpitem.attr("data-artist_id")) {
NotifyOfNewSong();
}
<?php } ?>
}
if (brkey != '') {
@ -176,7 +176,7 @@ if (!$isVideo && !$isRadio && !$is_share) {
if (AmpConfig::get('sociable')) {
echo "actionsobj += ' <a href=\"javascript:NavigateTo(\'" . AmpConfig::get('web_path') . "/shout.php?action=show_add_shout&type=song&id=' + currenti.attr('data-song_id') + '\');\">" . UI::get_icon('comment', T_('Post Shout')) . "</a>';";
}
echo "actionsobj += '<div id=\'action_buttons\'></div>';";
echo "actionsobj += '<div id=\'action_buttons\'></div>';";
if (AmpConfig::get('waveform')) {
echo "var waveformobj = '';";
if (AmpConfig::get('waveform')) {
@ -271,7 +271,7 @@ if ($isVideo) {
$("#jquery_jplayer_1").bind($.jPlayer.event.volumechange, function(event) {
$.cookie('jp_volume', event.jPlayer.options.volume, { expires: 7, path: '/'});
});
$('#jp_container_1' + ' ul:last').sortable({
update: function () {
jplaylist.scan();
@ -585,7 +585,7 @@ if ($isVideo) {
} else {
$broadcast_id = $broadcasts[0];
}
$broadcast = new Broadcast($broadcast_id);
$key = Broadcast::generate_key();
$broadcast->update_state(true, $key);

View file

@ -21,7 +21,7 @@
*/
?>
<script type="text/javascript">
<script type="text/javascript">
setTagsChoices('<?php echo Tag::get_display(Tag::get_tags()); ?>');
</script>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php' ?>

View file

@ -23,7 +23,7 @@
$web_path = AmpConfig::get('web_path');
$thcount = 8;
?>
<script type="text/javascript">
<script type="text/javascript">
setTagsChoices('<?php echo Tag::get_display(Tag::get_tags()); ?>');
</script>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>

View file

@ -39,7 +39,7 @@
<a class="tag_delete" href="<?php echo AmpConfig::get('ajax_url') ?>?page=tag&action=delete&tag_id=<?php echo $data['id']; ?>" onclick="return confirm('<?php echo T_('Do you really want to delete the tag?'); ?>');"><?php echo UI::get_icon('delete', T_('Delete')); ?></a>
</li>
</ul>
</div>
</div>
<?php } ?>
<?php } ?>
<?php if (!count($object_ids)) { ?>