Skip to content

Commit

Permalink
add icon for menu
Browse files Browse the repository at this point in the history
  • Loading branch information
tontof committed Mar 27, 2013
1 parent 64b3846 commit a0fed21
Show file tree
Hide file tree
Showing 7 changed files with 1,421 additions and 165 deletions.
40 changes: 20 additions & 20 deletions src/class/FeedConf.php
Expand Up @@ -217,9 +217,7 @@ public function __construct($configFile, $version)
$this->order = $order;
$this->byPage = $byPage;

if ($this->isLogged()) {
$this->write();
}
$this->write();
}

if (!$this->isLogged()) {
Expand Down Expand Up @@ -750,25 +748,27 @@ public function isLogged()
*/
public function write()
{
$data = array('login', 'hash', 'salt', 'title', 'redirector', 'shaarli',
'byPage', 'order', 'visibility', 'filter', 'view','locale',
'maxItems', 'autoreadItem', 'autoreadPage', 'maxUpdate',
'autohide', 'autofocus', 'listFeeds', 'autoUpdate', 'menuView',
'menuListFeeds', 'menuFilter', 'menuOrder', 'menuUpdate',
'menuRead', 'menuUnread', 'menuEdit', 'menuAdd', 'menuHelp',
'pagingItem', 'pagingPage', 'pagingByPage', 'addFavicon',
'pagingMarkAs', 'disableSessionProtection');
$out = '<?php';
$out .= "\n";

foreach ($data as $key) {
$out .= '$this->'.$key.' = '.var_export($this->$key, true).";\n";
}
if ($this->isLogged() || !is_file($this->_file)) {
$data = array('login', 'hash', 'salt', 'title', 'redirector', 'shaarli',
'byPage', 'order', 'visibility', 'filter', 'view','locale',
'maxItems', 'autoreadItem', 'autoreadPage', 'maxUpdate',
'autohide', 'autofocus', 'listFeeds', 'autoUpdate', 'menuView',
'menuListFeeds', 'menuFilter', 'menuOrder', 'menuUpdate',
'menuRead', 'menuUnread', 'menuEdit', 'menuAdd', 'menuHelp',
'pagingItem', 'pagingPage', 'pagingByPage', 'addFavicon',
'pagingMarkAs', 'disableSessionProtection');
$out = '<?php';
$out .= "\n";

foreach ($data as $key) {
$out .= '$this->'.$key.' = '.var_export($this->$key, true).";\n";
}

$out .= '?>';
$out .= '?>';

if (!@file_put_contents($this->_file, $out)) {
die("Can't write to ".CONFIG_FILE." check permissions");
if (!@file_put_contents($this->_file, $out)) {
die("Can't write to ".CONFIG_FILE." check permissions");
}
}
}
}
6 changes: 3 additions & 3 deletions src/class/tpl/list_feeds.tpl.php
Expand Up @@ -38,9 +38,9 @@
<a class="mark-as" href="<?php echo $query.'read='.$hashFolder; ?>"><span class="label"><?php echo $folder['nbUnread']; ?></span></a>
<a class="folder-toggle" href="<?php echo $query.'toggleFolder='.$hashFolder; ?>" data-toggle="collapse" data-target="#folder-ul-<?php echo $hashFolder; ?>">
<span class="ico">
<span class="ico-circle"></span>
<span class="ico-line-h"></span>
<span class="ico-line-v<?php echo ($isOpen?' folder-toggle-open':' folder-toggle-close'); ?>"></span>
<span class="ico-b-disc"></span>
<span class="ico-w-line-h"></span>
<span class="ico-w-line-v<?php echo ($isOpen?' folder-toggle-open':' folder-toggle-close'); ?>"></span>
</span>
</a>
<a href="<?php echo '?currentHash='.$hashFolder; ?>"><?php echo htmlspecialchars($folder['title']); ?></a>
Expand Down
8 changes: 4 additions & 4 deletions src/class/tpl/list_items.tpl.php
Expand Up @@ -8,10 +8,10 @@
<?php if ($view==='list') { ?>
<a id="item-toggle-<?php echo $itemHash; ?>" class="item-toggle item-toggle-plus" href="<?php echo $query.'current='.$itemHash.((!isset($_GET['open']) or $currentItemHash != $itemHash)?'&amp;open':''); ?>" data-toggle="collapse" data-target="#item-div-<?php echo $itemHash; ?>">
<?php echo $item['time']['list']; ?>
<span class="ico">
<span class="ico-circle"></span>
<span class="ico-line-h"></span>
<span class="ico-line-v<?php echo ((!isset($_GET['open']) or $currentItemHash != $itemHash)?' item-toggle-close':' item-toggle-open'); ?>"></span>
<span class="ico ico-toggle-item">
<span class="ico-b-disc"></span>
<span class="ico-w-line-h"></span>
<span class="ico-w-line-v<?php echo ((!isset($_GET['open']) or $currentItemHash != $itemHash)?' item-toggle-close':' item-toggle-open'); ?>"></span>
</span>
</a>
<dl class="dl-horizontal item">
Expand Down

0 comments on commit a0fed21

Please sign in to comment.