12345678910111213141516171819202122232425262728293031323334353637383940 |
- 'use strict';
- angular.module('app')
- .directive('layout', [function() {
- return {
- restrict: 'A',
- link: function(scope, element, attrs) {
- var ww = $(window).width();
- var wh = $(window).height();
- var mainbox = $('.ui_mainbox');
- if (wh - 76 < 425) {
- mainbox.height(425);
- } else {
- mainbox.height(wh - 76);
- }
- if (ww > 1600) {
- mainbox.width(1600);
- $('.ui_button').width(1580);
- } else {
- mainbox.width(1200);
- $('.ui_button').width(1180);
- }
- //$('.cb,.rb').inputbox();
- $(window).resize(function() {
- ww = $(window).width();
- wh = $(window).height();
- if (wh - 76 < 425) {
- mainbox.height(425);
- } else {
- mainbox.height(wh - 76);
- }
- if (ww > 1600) {
- mainbox.width(1600);
- } else {
- mainbox.width(1200);
- }
- });
- }
- };
- }])
|