Skip to content
GitLab
Erkunden
Anmelden
Registrieren
Primärnavigation
Suchen oder aufrufen …
Projekt
FAQ
Verwalten
Aktivität
Mitglieder
Labels
Planen
Tickets
3
Ticketübersichten
Meilensteine
Wiki
Code
Merge Requests
0
Repository
Branch
Commits
Tags
Repository-Diagramm
Revisionen vergleichen
Build
Pipelines
Aufgaben
Pipeline-Zeitpläne
Artefakte
Bereitstellung
Releases
Betreiben
Umgebungen
Überwachen
Vorfälle
Service-Desk
Analysieren
Wertschöpfungskettenanalyse
Mitwirkenden-Analyse
CI/CD-Analyse
Repository-Analysen
Hilfe
Hilfe
Support
GitLab-Dokumentation
GitLab-Pläne vergleichen
Community-Forum
Zu GitLab beitragen
Feedback geben
Tastenkürzel
?
Code-Schnipsel
Gruppen
Projekte
Show more breadcrumbs
QUIQQER
FAQ
Commits
ac037370
Commit
ac037370
erstellt
vor 9 Jahren
von
Henning Leutz
Dateien durchsuchen
Optionen
Downloads
Patches
Einfaches Diff
code style
Übergeordneter
6032dfd5
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
Änderungen
1
Leerzeichenänderungen ausblenden
Inline
Nebeneinander
1 geänderte Datei
bin/Category.js
+39
-36
39 Ergänzungen, 36 Löschungen
bin/Category.js
wird angezeigt
mit
39 Ergänzungen
und
36 Löschungen
bin/Category.js
+
39
−
36
Zeige Datei @
ac037370
/**
* Category handling
* Set events and scroll effects
*
* @module package/quiqqer/faq/bin/Category
* @author www.pcsg.de (Henning Leutz)
*
* @require qui/QUI
* @require qui/controls/Control
*/
define
(
'
package/quiqqer/faq/bin/Category
'
,
[
'
qui/QUI
'
,
'
qui/controls/Control
'
],
function
(
QUI
,
QUIControl
)
{
],
function
(
QUI
,
QUIControl
)
{
"
use strict
"
;
return
new
Class
({
Extends
:
QUIControl
,
Type
:
'
package/quiqqer/faq/bin/Category
'
,
Extends
:
QUIControl
,
Type
:
'
package/quiqqer/faq/bin/Category
'
,
Binds
:
[
Binds
:
[
'
$onImport
'
,
'
scrollToTop
'
,
'
$scrollToClick
'
],
initialize
:
function
(
options
)
{
this
.
parent
(
options
);
initialize
:
function
(
options
)
{
this
.
parent
(
options
);
this
.
addEvents
({
onImport
:
this
.
$onImport
...
...
@@ -31,26 +38,25 @@ define('package/quiqqer/faq/bin/Category', [
/**
* event : on import
*/
$onImport
:
function
()
{
var
links
=
this
.
getElm
().
getElements
(
'
.quiqqer-faq-list li a
'
),
topList
=
this
.
getElm
().
getElements
(
'
[href="#top"]
'
);
$onImport
:
function
()
{
var
links
=
this
.
getElm
().
getElements
(
'
.quiqqer-faq-list li a
'
),
topList
=
this
.
getElm
().
getElements
(
'
[href="#top"]
'
);
for
(
var
i
=
0
,
len
=
links
.
length
;
i
<
len
;
i
++
)
{
links
[
i
].
addEvent
(
'
click
'
,
this
.
$scrollToClick
);
for
(
var
i
=
0
,
len
=
links
.
length
;
i
<
len
;
i
++
)
{
links
[
i
].
addEvent
(
'
click
'
,
this
.
$scrollToClick
);
}
topList
.
addEvent
(
'
click
'
,
this
.
scrollToTop
);
topList
.
addEvent
(
'
click
'
,
this
.
scrollToTop
);
// check location
if
(
!
window
.
location
.
hash
||
window
.
location
.
hash
===
''
)
{
if
(
!
window
.
location
.
hash
||
window
.
location
.
hash
===
''
)
{
return
;
}
var
Article
=
this
.
getElm
().
getElement
(
window
.
location
.
hash
);
var
Article
=
this
.
getElm
().
getElement
(
window
.
location
.
hash
);
if
(
Article
)
{
new
Fx
.
Scroll
(
window
).
toElement
(
Article
);
if
(
Article
)
{
new
Fx
.
Scroll
(
window
).
toElement
(
Article
);
}
},
...
...
@@ -59,33 +65,31 @@ define('package/quiqqer/faq/bin/Category', [
*
* @param {DOMEvent} event - click event
*/
$scrollToClick
:
function
(
event
)
{
if
(
typeOf
(
event
)
===
'
domevent
'
)
{
$scrollToClick
:
function
(
event
)
{
if
(
typeOf
(
event
)
===
'
domevent
'
)
{
event
.
stop
();
}
var
Target
=
event
.
target
,
href
=
Target
.
get
(
'
href
'
);
href
=
Target
.
get
(
'
href
'
);
href
=
href
.
split
(
'
#
'
);
href
=
href
.
split
(
'
#
'
);
if
(
typeof
href
[
1
]
===
'
undefined
'
)
{
if
(
typeof
href
[
1
]
===
'
undefined
'
)
{
return
;
}
var
Article
=
this
.
getElm
().
getElement
(
'
#
'
+
href
[
1
]
);
var
Article
=
this
.
getElm
().
getElement
(
'
#
'
+
href
[
1
]
);
if
(
!
Article
)
{
if
(
!
Article
)
{
return
;
}
new
Fx
.
Scroll
(
window
,
{
onComplete
:
function
()
{
window
.
location
=
'
#
'
+
href
[
1
];
onComplete
:
function
()
{
window
.
location
=
'
#
'
+
href
[
1
];
}
}).
toElement
(
Article
);
}).
toElement
(
Article
);
},
/**
...
...
@@ -93,14 +97,13 @@ define('package/quiqqer/faq/bin/Category', [
*
* @param {DOMEvent} [event] - (optional) click dom event
*/
scrollToTop
:
function
(
event
)
{
if
(
typeOf
(
event
)
===
'
domevent
'
)
{
scrollToTop
:
function
(
event
)
{
if
(
typeOf
(
event
)
===
'
domevent
'
)
{
event
.
stop
();
}
new
Fx
.
Scroll
(
window
,
{
onComplete
:
function
()
{
onComplete
:
function
()
{
window
.
location
=
'
#
'
;
}
}).
toTop
();
...
...
This diff is collapsed.
Zum Erweitern klicken.
Vorschau
0%
Wiederholen
oder
Neue Datei anhängen
.
Abbrechen
You are about to add
0
people
to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Kommentar speichern
Abbrechen
Bitte
registrieren
oder
Anmelden
zum Kommentieren