Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch-contrib
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch-contrib
Commits
f75dbeb7
提交
f75dbeb7
authored
2月 05, 2011
作者:
Mathieu Parent
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MediaBrotha: Add missing HTML files
上级
1f397005
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
180 行增加
和
0 行删除
+180
-0
default.css
sathieu/cisco-xml/browser/static/default.css
+49
-0
dynamic.js
sathieu/cisco-xml/browser/static/dynamic.js
+4
-0
HTML.php
sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php
+127
-0
没有找到文件。
sathieu/cisco-xml/browser/static/default.css
0 → 100644
浏览文件 @
f75dbeb7
/*
* body > ul#mediaListElement > li.mediaElement
*/
li
.mediaElement
{
padding
:
2px
;
margin
:
0px
;
list-style-type
:
none
;
}
li
.mediaElement
:nth-child
(
odd
)
{
background-color
:
#d1e3ed
;
}
/*
* body > ul#mediaListElement
*/
#mediaListElement
{
padding
:
2px
;
margin
:
0px
;
}
/*
* body > ul#mediaListElement > li.mediaElement > ul.mediaActionsListElement
*/
li
.mediaElement
.mediaActionsListElement
{
padding
:
2px
;
margin
:
0px
;
margin-left
:
20px
;
list-style-type
:
none
;
-moz-transition-property
:
max-height
,
opacity
,
visibility
;
-moz-transition-duration
:
3s
,
2s
,
0.2s
;
-moz-transition-delay
:
0s
,
1s
,
1s
;
max-height
:
0px
;
opacity
:
0
;
visibility
:
hidden
;
}
li
.mediaElement
:hover
.mediaActionsListElement
{
-moz-transition-property
:
max-height
,
opacity
,
visibility
;
-moz-transition-duration
:
0.5s
,
2s
,
0.2s
;
-moz-transition-delay
:
0.4s
,
0.4s
,
0.4s
;
max-height
:
200px
;
opacity
:
1
;
visibility
:
visible
;
}
sathieu/cisco-xml/browser/static/dynamic.js
0 → 100644
浏览文件 @
f75dbeb7
function
bodyLoaded
()
{
//nothing yet
}
sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php
0 → 100644
浏览文件 @
f75dbeb7
<?php
/*
Copyright 2011 Mathieu Parent <math.parent@gmail.com>
This file is part of MediaBrotha.
MediaBrotha is free software: you can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation, either
version 3 of the License, or (at your option) any later version.
MediaBrotha is distributed in the hope that it
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MediaBrotha. If not, see
<http://www.gnu.org/licenses/>.
*/
/**
* @author Mathieu Parent
*/
require_once
(
'HTTP.php'
);
class
MediaBrotha_Frontend_HTML
extends
MediaBrotha_Frontend_HTTP
{
private
$_xml
=
NULL
;
private
$_body
=
NULL
;
private
$_mediaListElement
=
NULL
;
private
$_actionsListElement
=
NULL
;
private
function
_mediaActionLinks
(
$parent
,
$media
,
$tag_name
)
{
$url
=
$this
->
rootURL
()
.
'?'
.
MediaBrotha_Core
::
value2hash
(
'mime_type='
.
urlencode
(
$media
->
getMimeType
())
.
'&'
.
(
$media
->
getMimeEncoding
()
?
(
'mime_encoding='
.
urlencode
(
$media
->
getMimeEncoding
())
.
'&'
)
:
''
)
.
'uri='
.
urlencode
(
$media
->
getURI
()));
foreach
(
MediaBrotha_Core
::
getBackends
()
as
$backend
)
{
foreach
(
$backend
->
getMediaActions
(
$media
)
as
$action
)
{
$tag
=
$this
->
_xml
->
createElement
(
$tag_name
);
$tag
=
$parent
->
appendChild
(
$tag
);
$a
=
$this
->
_xml
->
createElement
(
'a'
);
$a
=
$tag
->
appendChild
(
$a
);
$a
->
setAttribute
(
'href'
,
"
$url
&"
.
MediaBrotha_Core
::
value2hash
(
'action='
.
$action
.
'&backend='
.
$backend
->
getBackendName
()));
$text
=
$this
->
_xml
->
createTextNode
(
$action
);
$text
=
$a
->
appendChild
(
$text
);
}
}
}
public
function
begin
(
$item
)
{
$this
->
_xml
=
new
DOMDocument
(
'1.0'
);
$root
=
$this
->
_xml
->
createElement
(
'html'
);
$root
=
$this
->
_xml
->
appendChild
(
$root
);
$head
=
$this
->
_xml
->
createElement
(
'head'
);
$head
=
$root
->
appendChild
(
$head
);
$title
=
$this
->
_xml
->
createElement
(
'title'
);
$title
=
$head
->
appendChild
(
$title
);
$text
=
$this
->
_xml
->
createTextNode
(
$item
->
getDisplayName
());
$text
=
$title
->
appendChild
(
$text
);
$style
=
$this
->
_xml
->
createElement
(
'link'
);
$style
=
$head
->
appendChild
(
$style
);
$style
->
setAttribute
(
'type'
,
'text/css'
);
$style
->
setAttribute
(
'rel'
,
'stylesheet'
);
$style
->
setAttribute
(
'href'
,
$this
->
rootURL
()
.
'static/default.css'
);
$script
=
$this
->
_xml
->
createElement
(
'script'
);
$script
=
$head
->
appendChild
(
$script
);
$script
->
setAttribute
(
'type'
,
'text/javascript'
);
$script
->
setAttribute
(
'src'
,
$this
->
rootURL
()
.
'static/dynamic.js'
);
$this
->
_body
=
$this
->
_xml
->
createElement
(
'body'
);
$this
->
_body
=
$root
->
appendChild
(
$this
->
_body
);
$this
->
_body
->
setAttribute
(
'onload'
,
'bodyLoaded();'
);
$this
->
_mediaListElement
=
$this
->
_xml
->
createElement
(
'ul'
);
$this
->
_mediaListElement
=
$this
->
_body
->
appendChild
(
$this
->
_mediaListElement
);
$this
->
_mediaListElement
->
setAttribute
(
'id'
,
'mediaListElement'
);
if
(
$parent
=
$item
->
getParent
())
{
$this
->
addItem
(
$parent
);
}
}
public
function
addItem
(
$item
)
{
$url
=
$this
->
rootURL
()
.
'?'
.
MediaBrotha_Core
::
value2hash
(
'mime_type='
.
urlencode
(
$item
->
getMimeType
())
.
'&'
.
(
$item
->
getMimeEncoding
()
?
(
'mime_encoding='
.
urlencode
(
$item
->
getMimeEncoding
())
.
'&'
)
:
''
)
.
'uri='
.
urlencode
(
$item
->
getURI
()));
$li
=
$this
->
_xml
->
createElement
(
'li'
);
$li
=
$this
->
_mediaListElement
->
appendChild
(
$li
);
$li
->
setAttribute
(
'class'
,
'mediaElement'
);
$a
=
$this
->
_xml
->
createElement
(
'a'
);
$a
=
$li
->
appendChild
(
$a
);
$a
->
setAttribute
(
'href'
,
$url
);
$text
=
$this
->
_xml
->
createTextNode
(
$item
->
getDisplayName
());
$text
=
$a
->
appendChild
(
$text
);
$ul
=
$this
->
_xml
->
createElement
(
'ul'
);
$ul
=
$li
->
appendChild
(
$ul
);
$ul
->
setAttribute
(
'class'
,
'mediaActionsListElement'
);
$this
->
_mediaActionLinks
(
$ul
,
$item
,
'li'
);
}
public
function
finish
(
$item
)
{
$this
->
_actionsListElement
=
$this
->
_xml
->
createElement
(
'ul'
);
$this
->
_actionsListElement
=
$this
->
_body
->
appendChild
(
$this
->
_actionsListElement
);
$this
->
_actionsListElement
->
setAttribute
(
'id'
,
'actionsListElement'
);
$this
->
_mediaActionLinks
(
$this
->
_actionsListElement
,
$item
,
'li'
);
}
public
function
render
()
{
print
$this
->
_xml
->
saveHTML
();
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论