Skip to content
Snippets Groups Projects
Commit 4402e459 authored by llaffont's avatar llaffont
Browse files

Correction éditeur CSS

parent 739c1ecd
Branches
Tags
No related merge requests found
......@@ -46,7 +46,8 @@ if (Class_Users::isCurrentUserAdmin() && Class_AdminVar::isCssEditorEnabled()) {
->loadAmber(true)
->addAmberPackage('AFI-OPAC');
$this->header_css .= '?cache='.md5(time());
if ($this->header_css)
$this->header_css .= '?cache='.md5(time());
}
if ($this->header_css)
......
......@@ -425,7 +425,8 @@
(defun ack (command-args)
(interactive
(let ((ack-command "ack-grep --nogroup --with-filename --all "))
(let ((ack-command
(if (file-exists-p "/usr/bin/ack-grep") "ack-grep " "ack ")))
(list (read-shell-command "Run ack (like this): "
ack-command
'ack-history))))
......@@ -434,7 +435,7 @@
'grep-mode)))
(defun djcb-gtags-create-or-update ()
(defun phafi-update-gtags ()
"create or update the gnu global tag file"
(interactive)
(if (not (= 0 (call-process "global" nil nil nil " -p"))) ; tagfile doesn't exist?
......@@ -444,17 +445,17 @@
(cd topdir)
(shell-command "gtags && echo 'created tagfile'")
(cd olddir)) ; restore
;; tagfile already exists; update it
;; (shell-command "")
(call-process-shell-command "global -u && echo 'updated tagfile'" nil "*Shell Command Output*" t)
))
(add-hook 'gtags-mode-hook
(lambda()
(local-set-key (kbd "M-.") 'gtags-find-tag) ; find a tag, also M-.
(local-set-key (kbd "M-,") 'gtags-find-rtag) ; reverse tag
(local-set-key (kbd "C-M-,") 'gtags-pop-stack); find tag if on call function or reverse tag if on function def
))
))
(add-hook 'c-mode-common-hook
(lambda ()
......@@ -464,14 +465,7 @@
(defun magit-status-cur-dir()
(interactive)
(message (concat "Current direcotry= " (phafi-cur-dir)))
;;(magit-repo-dirs ((phafi-cur-dir)))
;;(magit-status)
;;(setq phafi-magit-status-cur-dir
;;(concat "magit diff --stat " (phafi-cur-dir)))
;;(compile phafi-magit-status-cur-dir)
;; ('magit diff --stat -- phafi-cur-dir)
(interactive)
(message (concat "Current direcotry= " (phafi-cur-dir)))
)
......@@ -92,6 +92,24 @@ class IndexControllerAsAdminWithoutCssEditor extends IndexControllerAsAdminTestC
class IndexControllerAsAdminWithCssEditorAndNoHeaderCss extends IndexControllerAsAdminTestCase {
public function setUp() {
parent::setUp();
Class_Profil::find(1)->setHeaderCss('');
Class_AdminVar::newInstanceWithID('CSS_EDITOR', ['valeur' => 1]);
$this->dispatch('/?id_profil=1');
}
/** @test */
public function headerCssShouldNotBeIncluded() {
$this->assertNotXPath('//link[@id="profil_css"]');
}
}
class IndexControllerAsAdminWithCSSEditorTest extends IndexControllerAsAdminTestCase {
public function setUp() {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment