Commit f4c8b2ea by Kim Eunchul

#39703 ジャンルツリーの表示幅変更

parent ce9b40c5
$(function() {
$("ul.switchingTab li a").click(function(){
var listNum = 0;
$("div.tabUnitList").each(
function(i) {
var thisID = "#list_"+i;
if($(thisID).css("display") == "block"){
$(thisID).css("display","none");
if(i == 1){
listNum = 0;
}else{
listNum = 1;
}
}
}
);
......@@ -16,6 +21,48 @@ $(function() {
var tabTarget = $(this).attr("href");
var tabTargetID = tabTarget;
$(tabTargetID).css("display","block");
var x = document.getElementsByClassName("tabUnitList")[listNum].clientHeight + 60;
$(".tabUnit").css("height", x +"px");
ResizeTab();
return false;
});
});
function ResizeTab() {
var x = document.getElementsByClassName("articlehome");
var y = document.getElementsByClassName("tabUnit")[0].clientWidth;
var width = 930 - y;
var margin = y - 280;
x[0].setAttribute("style","width:" + width + "px");
$(".cnt_section_list .text .info .pic li .iconList").css("margin-right", margin);
$(".sankaku_left").css("margin-left", 54 + margin*0.5);
$(".sankaku_right").css("margin-left", 179 + margin*0.5);
if(y > 280){
$(".no_m_right").css("margin-right", "25px");
}else{
$(".no_m_right").css("margin-right", "0px");
}
if(y >= 435){
$(".cnt_section_list .text").css("width", "199px");
$(".cnt_section_list .text").css("margin", "0 0 0 0");
$(".cnt_section_list .text .info .pic li .iconList").css("margin-right", 0);
$(".cnt_section_list .text .info .pic li .iconList").css("right", 0);
$(".cnt_section_list .text .info .pic li .iconList").css("position", "relative");
}else{
$(".cnt_section_list .text").css("width", "300px");
$(".cnt_section_list .text").css("margin", "0 0 0 25px");
$(".cnt_section_list .text .info .pic li .iconList").css("right", -145);
$(".cnt_section_list .text .info .pic li .iconList").css("position", "absolute");
}
if(193 + document.getElementsByClassName("sort_area")[0].clientWidth > x[0].clientWidth){
$(".tops p").css("top", "75px");
}else{
$(".tops p").css("top", "40px");
}
}
\ No newline at end of file
......@@ -16,17 +16,18 @@
}
.sort_area{
float:right;
padding: 6px 0px 0px 6px;
}
.sort_area span{
float:left;
margin:7px 7px 0px 0px;
}
.tops p{
padding: 3px 0px 0px 0px;
position: absolute;
right: 0;
float:right;
top: 40px;
padding: 0 2px 0 0;
margin: 0;
clear:both;
}
.tops ul.disp {
......@@ -42,7 +43,13 @@
height: 33px;
float:left;
}
.no_m_right{ margin-right:0!important;}
.no_m_right{ margin-right:0}
#content-grid
{
position: relative;
top:45px;
}
#dlgSubMenu
{
......
......@@ -121,7 +121,7 @@
<div id="ws-body" class="wrapper_ws" >
<div id="inc_backup"></div>
<div id="main-ws" class="hoge">
<div class="tabUnit" style="display:none;" >
<div class="tabUnit" style="display:none;" onresize="ResizeTab()">
<ul class="switchingTab">
<li class="colleft" ><a href="#list_0" class="current" id="lnkbtnGenre"> </a></li>
<li class="colright" style="display:none;"><a href="#list_1" id="lnkbtnGroup"> </a></li>
......
......@@ -216,6 +216,11 @@ $(document).ready(function() {
$('#bookshelf-main').width(660);
} else {
$('.tabUnit').show();
$('.tabUnit').resizable({
handles: 'e',
minWidth: 280,
maxWidth: 560
});
}
// hide tab group with user anonymous
......@@ -427,6 +432,9 @@ HOME.changeDispBookShelfFunction = function() {
// Get next record will be displayed
HOME.getNextRecordNumForBookShelf();
//resize tab
HOME.ResizeTab();
};
// Change Display List Function
......@@ -475,8 +483,50 @@ HOME.changeDispListFunction = function() {
// Get next record will be displayed
HOME.getNextRecordNumForList();
//resize tab
HOME.ResizeTab();
};
HOME.ResizeTab = function() {
var x = document.getElementsByClassName("articlehome");
var y = document.getElementsByClassName("tabUnit")[0].clientWidth;
var width = 930 - y;
var margin = y - 280;
var sankakuMarginL = y - 226;
x[0].setAttribute("style","width:" + width + "px");
$(".cnt_section_list .text .info .pic li .iconList").css("margin-right", margin);
$(".sankaku_left").css("margin-left", 54 + margin*0.5);
$(".sankaku_right").css("margin-left", 179 + margin*0.5);
if(y > 280){
$(".no_m_right").css("margin-right", "25px");
}else{
$(".no_m_right").css("margin-right", "0px");
}
if(y >= 435){
$(".cnt_section_list .text").css("width", "199px");
$(".cnt_section_list .text").css("margin", "0 0 0 0");
$(".cnt_section_list .text .info .pic li .iconList").css("margin-right", 0);
$(".cnt_section_list .text .info .pic li .iconList").css("right", 0);
$(".cnt_section_list .text .info .pic li .iconList").css("position", "relative");
}else{
$(".cnt_section_list .text").css("width", "300px");
$(".cnt_section_list .text").css("margin", "0 0 0 25px");
$(".cnt_section_list .text .info .pic li .iconList").css("right", -145);
$(".cnt_section_list .text .info .pic li .iconList").css("position", "absolute");
}
if(193 + document.getElementsByClassName("sort_area")[0].clientWidth > x[0].clientWidth){
$(".tops p").css("top", "75px");
}else{
$(".tops p").css("top", "40px");
}
}
// Canvas Click function
HOME.canvasClickFunction = function(e) {
if (e) {
......@@ -966,6 +1016,9 @@ HOME.AddGenre_Callback = function(selectedNode) {
HOME.renderContent(id, searchText, searchDivision, sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
HOME.handleSortDisp();
//resize tab
HOME.ResizeTab();
};
// Get Data from Group Json
......@@ -1126,6 +1179,9 @@ HOME.AddGroup_Callback = function(selectedNode) {
HOME.renderContent(id, searchText, searchDivision, sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
HOME.handleSortDisp();
//resize tab
HOME.ResizeTab();
};
// Re-render page from and total record
......@@ -1398,6 +1454,8 @@ HOME.showNextRecordFunction = function() {
if (offsetPage <= totalrecord) {
HOME.renderContent(sid, searchText, searchDivision, sortType, sortOrder, offsetPage, limitPage, genreId, groupId);
}
//resize tab
HOME.ResizeTab();
};
// Sort By Title Function
......@@ -1437,6 +1495,9 @@ HOME.sortByTitleFunction = function() {
HOME.refreshGrid();
HOME.renderContent(sid, ClientData.searchCond_searchText(), ClientData.searchCond_searchDivision(), sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
//resize tab
HOME.ResizeTab();
};
// Sort By Title Kana function
......@@ -1476,6 +1537,8 @@ HOME.sortByTitleKanaFunction = function() {
ClientData.searchCond_sortType(sortType);
HOME.renderContent(sid, ClientData.searchCond_searchText(), ClientData.searchCond_searchDivision(), sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
//resize tab
HOME.ResizeTab();
};
// Sort By Release Date
......@@ -1515,6 +1578,8 @@ HOME.sortByReleaseDateFunction = function() {
ClientData.searchCond_sortType(sortType);
HOME.renderContent(sid, ClientData.searchCond_searchText(), ClientData.searchCond_searchDivision(), sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
//resize tab
HOME.ResizeTab();
};
// Handle language
......@@ -1578,6 +1643,7 @@ HOME.renderContent = function(id, text, division, type, order, offset, limit, ca
if ((HOME.home_realTotalRecord + i + 1) % 3 == 0) {
$('#bookshelf' + post.contentId).addClass('no_m_right');
$('#bookshelf' + post.contentId).css("margin-right", "0px");
}
HOME.getNextRecordNumForBookShelf();
} else {
......
Markdown is supported
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