Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
7cc4df85
Commit
7cc4df85
authored
May 22, 2012
by
Guillaume Lambert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added prevent default to anbu events and linted/formatted profiler.js code
Signed-off-by: Guillaume Lambert <falzhobel@gmail.com>
parent
63b1636d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
65 deletions
+95
-65
application/config/application.php
+1
-1
laravel/profiling/profiler.css
+6
-0
laravel/profiling/profiler.js
+88
-64
No files found.
application/config/application.php
View file @
7cc4df85
...
...
@@ -67,7 +67,7 @@ return array(
|
*/
'profiler'
=>
fals
e
,
'profiler'
=>
tru
e
,
/*
|--------------------------------------------------------------------------
...
...
laravel/profiling/profiler.css
View file @
7cc4df85
...
...
@@ -214,3 +214,9 @@ span.anbu-count
white-space
:
-o-pre-wrap
;
word-wrap
:
break-word
;
}
/* hide panel-open elements, will become visible through anbu.start() */
#anbu-close
,
#anbu-zoom
,
.anbu-tab-pane
{
visibility
:
hidden
;
}
laravel/profiling/profiler.js
View file @
7cc4df85
...
...
@@ -6,77 +6,103 @@ var anbu = {
// the DOM every time they are used.
el
:
{
main
:
$
(
'.anbu'
),
close
:
$
(
'#anbu-close'
),
zoom
:
$
(
'#anbu-zoom'
),
hide
:
$
(
'#anbu-hide'
),
show
:
$
(
'#anbu-show'
),
tab_pane
:
$
(
'.anbu-tab-pane'
),
hidden_tab_pane
:
$
(
'.anbu-tab-pane:visible'
),
tab
:
$
(
'.anbu-tab'
),
tabs
:
$
(
'.anbu-tabs'
),
tab_links
:
$
(
'.anbu-tabs a'
),
window
:
$
(
'.anbu-window'
),
closed_tabs
:
$
(
'#anbu-closed-tabs'
),
open_tabs
:
$
(
'#anbu-open-tabs'
),
content_area
:
$
(
'.anbu-content-area'
)
main
:
$
(
'.anbu'
),
close
:
$
(
'#anbu-close'
),
zoom
:
$
(
'#anbu-zoom'
),
hide
:
$
(
'#anbu-hide'
),
show
:
$
(
'#anbu-show'
),
tab_pane
:
$
(
'.anbu-tab-pane'
),
hidden_tab_pane
:
$
(
'.anbu-tab-pane:visible'
),
tab
:
$
(
'.anbu-tab'
),
tabs
:
$
(
'.anbu-tabs'
),
tab_links
:
$
(
'.anbu-tabs a'
),
window
:
$
(
'.anbu-window'
),
closed_tabs
:
$
(
'#anbu-closed-tabs'
),
open_tabs
:
$
(
'#anbu-open-tabs'
),
content_area
:
$
(
'.anbu-content-area'
)
},
// CLASS ATTRIBUTES
// -------------------------------------------------------------
// Useful variable for Anbu.
isZoomed
:
false
,
// is anbu in full screen mode
small_height
:
$
(
'.anbu-content-area'
).
height
(),
// initial height of content area
active_tab
:
'anbu-active-tab'
,
// the name of the active tab css
tab_data
:
'data-anbu-tab'
,
// the data attribute of the tab link
mini_button_width
:
'2.6em'
,
// size of anbu when compact
window_open
:
false
,
// is the top window open?
active_pane
:
''
,
// current active pane
// is anbu in full screen mode
is_zoomed
:
false
,
// initial height of content area
small_height
:
$
(
'.anbu-content-area'
).
height
(),
// the name of the active tab css
active_tab
:
'anbu-active-tab'
,
// the data attribute of the tab link
tab_data
:
'data-anbu-tab'
,
// size of anbu when compact
mini_button_width
:
'2.6em'
,
// is the top window open?
window_open
:
false
,
// current active pane
active_pane
:
''
,
// START()
// -------------------------------------------------------------
// Sets up all the binds for Anbu!
start
:
function
()
{
// hide initial elements
start
:
function
()
{
anbu
.
el
.
close
.
hide
();
anbu
.
el
.
zoom
.
hide
();
anbu
.
el
.
tab_pane
.
hide
();
// hide initial elements
anbu
.
el
.
close
.
css
(
'visibility'
,
'visible'
).
hide
();
anbu
.
el
.
zoom
.
css
(
'visibility'
,
'visible'
).
hide
();
anbu
.
el
.
tab_pane
.
css
(
'visibility'
,
'visible'
).
hide
();
// bind all click events
anbu
.
el
.
close
.
click
(
function
()
{
anbu
.
close_window
();
});
anbu
.
el
.
hide
.
click
(
function
()
{
anbu
.
hide
();
});
anbu
.
el
.
show
.
click
(
function
()
{
anbu
.
show
();
});
anbu
.
el
.
zoom
.
click
(
function
()
{
anbu
.
zoom
();
});
anbu
.
el
.
tab
.
click
(
function
()
{
anbu
.
clicked_tab
(
$
(
this
));
});
anbu
.
el
.
close
.
click
(
function
(
event
)
{
anbu
.
close_window
();
event
.
preventDefault
();
});
anbu
.
el
.
hide
.
click
(
function
(
event
)
{
anbu
.
hide
();
event
.
preventDefault
();
});
anbu
.
el
.
show
.
click
(
function
(
event
)
{
anbu
.
show
();
event
.
preventDefault
();
});
anbu
.
el
.
zoom
.
click
(
function
(
event
)
{
anbu
.
zoom
();
event
.
preventDefault
();
});
anbu
.
el
.
tab
.
click
(
function
(
event
)
{
anbu
.
clicked_tab
(
$
(
this
));
event
.
preventDefault
();
});
},
// CLICKED_TAB()
// -------------------------------------------------------------
// A tab has been clicked, decide what to do.
clicked_tab
:
function
(
tab
)
{
clicked_tab
:
function
(
tab
)
{
// if the tab is closed
if
(
anbu
.
window_open
&&
anbu
.
active_pane
==
tab
.
attr
(
anbu
.
tab_data
))
{
if
(
anbu
.
window_open
&&
anbu
.
active_pane
==
tab
.
attr
(
anbu
.
tab_data
))
{
anbu
.
close_window
();
}
else
{
}
else
{
anbu
.
open_window
(
tab
);
}
},
// OPEN_WINDOW()
// -------------------------------------------------------------
// Animate open the top window to the appropriate tab.
open_window
:
function
(
tab
)
{
open_window
:
function
(
tab
)
{
// can't directly assign this line, but it works
$
(
'.anbu-tab-pane:visible'
).
fadeOut
(
200
);
$
(
'.'
+
tab
.
attr
(
anbu
.
tab_data
)).
delay
(
220
).
fadeIn
(
300
);
...
...
@@ -87,15 +113,15 @@ var anbu = {
anbu
.
el
.
zoom
.
fadeIn
(
300
);
anbu
.
active_pane
=
tab
.
attr
(
anbu
.
tab_data
);
anbu
.
window_open
=
true
;
},
},
// CLOSE_WINDOW()
// -------------------------------------------------------------
// Animate closed the top window hiding all tabs.
close_window
:
function
()
{
close_window
:
function
()
{
anbu
.
el
.
tab_pane
.
fadeOut
(
100
);
anbu
.
el
.
window
.
slideUp
(
300
);
anbu
.
el
.
close
.
fadeOut
(
300
);
...
...
@@ -103,28 +129,28 @@ var anbu = {
anbu
.
el
.
tab_links
.
removeClass
(
anbu
.
active_tab
);
anbu
.
active_pane
=
''
;
anbu
.
window_open
=
false
;
},
},
// SHOW()
// -------------------------------------------------------------
// Show the Anbu toolbar when it has been compacted.
show
:
function
()
{
show
:
function
()
{
anbu
.
el
.
closed_tabs
.
fadeOut
(
600
,
function
()
{
anbu
.
el
.
open_tabs
.
fadeIn
(
200
);
})
});
anbu
.
el
.
main
.
animate
({
width
:
'100%'
},
700
);
anbu
.
el
.
main
.
removeClass
(
'hidden'
);
},
// HIDE()
// -------------------------------------------------------------
// Hide the anbu toolbar, show a tiny re-open button.
hide
:
function
()
{
hide
:
function
()
{
anbu
.
close_window
();
anbu
.
el
.
window
.
slideUp
(
400
,
function
()
{
...
...
@@ -132,7 +158,7 @@ var anbu = {
anbu
.
el
.
main
.
addClass
(
'hidden'
);
anbu
.
el
.
open_tabs
.
fadeOut
(
200
,
function
()
{
anbu
.
el
.
closed_tabs
.
fadeIn
(
200
);
})
})
;
anbu
.
el
.
main
.
animate
({
width
:
anbu
.
mini_button_width
},
700
);
});
...
...
@@ -142,27 +168,24 @@ var anbu = {
// -------------------------------------------------------------
// Toggle the zoomed mode of the top window.
zoom
:
function
()
{
if
(
anbu
.
isZoomed
)
{
zoom
:
function
()
{
if
(
anbu
.
is_zoomed
)
{
height
=
anbu
.
small_height
;
anbu
.
isZoomed
=
false
;
}
else
{
anbu
.
is_zoomed
=
false
;
}
else
{
// the 6px is padding on the top of the window
height
=
(
$
(
window
).
height
()
-
anbu
.
el
.
tabs
.
height
()
-
6
)
+
'px'
;
anbu
.
is
Z
oomed
=
true
;
anbu
.
is
_z
oomed
=
true
;
}
anbu
.
el
.
content_area
.
animate
({
height
:
height
},
700
);
}
}
}
};
jQuery
(
document
).
ready
(
function
()
{
// launch anbu
// launch anbu on jquery dom ready
jQuery
(
document
).
ready
(
function
()
{
anbu
.
start
();
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment