Skip to content

Commit 5f0b2da

Browse files
committed
#59 disable redmine responsive
1 parent 189d3b4 commit 5f0b2da

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

javascripts/theme.js

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,35 @@
9999
$(document).ready(addElements)
100100
}
101101
}
102-
}
102+
};
103+
104+
function removeRule() {
105+
if(typeof window.CSSMediaRule !== "function")
106+
return false; //Your browser doesn't support media query feature
107+
108+
var s = document.styleSheets, r,
109+
i, j, k;
103110

111+
if(!s) return false; //no style sheets found
112+
113+
// walk throuth css sheets
114+
for(i=0; i<s.length; i++) {
115+
// get all rules
116+
r = s[i].cssRules;
117+
if(!r) continue;
118+
119+
for(j=0; j<r.length; j++) {
120+
//If there's a rule for media query
121+
if(r[j] instanceof CSSMediaRule &&
122+
r[j].media.mediaText == "screen and (max-width: 899px)") {
123+
for(k=0; k<r[j].cssRules.length; k++) {
124+
// remove all rules of it
125+
r[j].deleteRule(r[j].cssRules[k]);
126+
}
127+
return true;
128+
}
129+
}
130+
}
131+
}
132+
removeRule();
104133
})( window );

stylesheets/projects.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ul.projects li.root {
44
border: 1px solid #d7d7d7;
55
}
66

7-
.theme-Flatly.light.redmine #projects-index {
7+
.theme-Flatly.light.redmine #projects-index {
88
column-count: unset;
99
column-width: unset;
1010
-webkit-column-count: unset;

0 commit comments

Comments
 (0)