THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

190 lines
8.0 KiB

@**
* Yobi, Project Hosting SW
*
* Copyright 2012 NAVER Corp.
* http://yobi.io
*
* @Author Sangcheol Hwang
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**@
@()
@import utils.TemplateHelper._
@**<!-- yobi.ui.Dialog -->**@
<div id="yobiDialog" class="modal hide fade yobiDialog" tabindex="-1" role="dialog" aria-hidden="true">
<div class="btn-dismiss"><button type="button" class="btn-transparent" data-dismiss="modal">&times;</button></div>
<div class="message">
<div class="center-text">
<p class="msg"></p>
<p class="desc"></p>
</div>
<div class="center-txt buttons">
<button type="button" class="ybtn ybtn-info" data-dismiss="modal">@Messages("button.confirm")</button>
</div>
</div>
</div>
@**<!-- //yobi.ui.Dialog -->**@
@**<!-- yobi.ui.Toast -->**@
<div id="yobiToasts" class="yobiToasts"></div>
<script type="text/x-jquery-tmpl" id="tplYobiToast">
<div class="toast" tabindex="-1">
<div class="btn-dismiss"><button type="button" class="btn-transparent">&times;</button></div>
<div class="center-text">
<span class="v"></span>
<div class="msg"></div>
</div>
</div>
</script>
@**<!-- //yobi.ui.Toast -->**@
@**<!-- //yobi.ui.Spinner -->**@
<div id="yobiSpinner" class="yobiSpinner">
<div class="spinContainer"></div>
</div>
@**<!-- //yobi.ui.Spinner -->**@
@if(UserApp.currentUser.isAnonymous){
@common.loginDialog()
}
<script type="text/javascript" src="@routes.Application.jsMessages()"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.tmpl.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.form.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.validate.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.zclip.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.placeholder.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.requestAs.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.search.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("bootstrap/js/bootstrap.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("bootstrap/js/bootstrap-better-typeahead.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("bootstrap/js/bootstrap-switch.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/rgbcolor.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/humanize.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/validate.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/spin.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Attachments.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Files.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Mention.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Markdown.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Pagination.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ShortcutKey.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Dropdown.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Typeahead.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Dialog.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Toast.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Tabs.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Spinner.js")"></script>
<script type="text/javascript">
$yobi.setScriptPath("@getJSPath");
$(document).ready(function(){
// tooltip
$(document.body).on("mouseenter", "[data-toggle=tooltip]", function(){
$(this).tooltip("show");
});
// jquery.placeholder plugin initiator
$('input[type=text], textarea').placeholder();
// current language set!
if (typeof window.moment == "function" && typeof window.moment.lang == "function") {
moment.lang("@implicitJavaLang.language");
}
// yobi.Dropdown
var sActivation;
$(".btn-group[data-name]").each(function(i, el){
sActivation = $(el).attr("data-activate");
if(typeof sActivation == "undefined" || sActivation != "manual"){
(new yobi.ui.Dropdown({"elContainer":el}));
}
});
// yobi.ShortcutKey
// Set CTRL+ENTER as submit form on INPUT/TEXTAREA
yobi.ShortcutKey.attach("CTRL+ENTER", function(htInfo){
if(htInfo.bFormInput){
$(htInfo.welTarget.parents("form").get(0)).submit();
}
});
@requestHeader.session.get("loginId") match {
case Some(loginId) => { }
case None => { }
}
@requestHeader.session.get("loginId") match {
case Some(v) => { yobi.ShortcutKey.setKeymapLink({
"P": "@routes.UserApp.userInfo(v)"
}); }
case None => { }
}
// yobi.Files
yobi.Files.init({
"sListURL" : "@routes.AttachmentApp.getFileList()",
"sUploadURL": "@routes.AttachmentApp.uploadFile()"
});
// ajax for issue link detail(ui.IssuePreview)
$(document).on("mouseenter", ".issueLink", function(){
var welTarget = $(this);
welTarget.tooltip({
"title": "@Messages("site.massMail.loading")",
"placement": "right"
}).tooltip("show");
$.getJSON(welTarget.attr("href"), function(htData){
if(welTarget.tooltip){
welTarget.tooltip("hide");
}
welTarget.popover({
"title" : htData.title,
"content" : htData.body,
"html" : true,
"placement": "right",
"trigger" : "hover"
}).popover("show");
});
});
$(document).on("mouseleave", ".issueLink", function(){
var welTarget = $(this);
welTarget.tooltip("destroy");
welTarget.popover("hide");
});
if(navigator.userAgent.match(/MSIE ([0-9])\./)){
$('.unsupported').show();
}
// notify flash messages
@requestHeader.flash.get(utils.Constants.TITLE) match {
case Some(title) => { $yobi.alert("@Messages(title)", null, "@Messages(requestHeader.flash.get(utils.Constants.DESCRIPTION).get)"); }
case None => { @requestHeader.flash.data.foreach {
case (_, value) => { $yobi.notify("@Messages(value)", 3000); }
}
}
}
$('[data-toggle="search-scope"]').on('click', function() {
$('form[name="gnb-search-form"]').attr('action', $(this).data('action'));
$('#gnb-search-scope-title').text($(this).text());
});
});
</script>