Procházet zdrojové kódy

added selling-home

version-14
Rushabh Mehta před 13 roky
rodič
revize
680fad6c8c
6 změnil soubory, kde provedl 44 přidání a 37 odebrání
  1. +7
    -3
      css/legacy/body.css
  2. +7
    -14
      css/legacy/sidebar.css
  3. +1
    -3
      js/legacy/wn/page_layout.js
  4. +7
    -7
      js/legacy/wn/widgets/page_sidebar.js
  5. +21
    -9
      js/wn/ui/listing.js
  6. +1
    -1
      py/build/bundle.py

+ 7
- 3
css/legacy/body.css Zobrazit soubor

@@ -231,10 +231,15 @@ div.std-footer-item {
padding: 15px;
}

.layout-wrapper-background {
background-color: #f2f2f2 !important;
padding: 0px;
}

.layout-main-section {
width: 68%;
float: left;
padding: 13px;
padding: 15px;
background-color: #FFF;
min-height: 450px;
}
@@ -242,10 +247,9 @@ div.std-footer-item {
.layout-side-section {
width: 24%;
float: right;
margin-right: 15px;
color: #606060;
overflow-x: hidden;
padding: 13px;
padding: 15px;
min-height: 450px;
}



+ 7
- 14
css/legacy/sidebar.css Zobrazit soubor

@@ -1,40 +1,33 @@
div.psidebar-wrapper {
margin: 0px 8px;
div.psidebar {
}

div.psidebar-head {
div.psidebar div.head {
font-size: 14px;
font-weight: bold;
color: #555;
margin-bottom: 12px;
}

div.psidebar-section {
div.psidebar div.section {
margin-bottom: 11px;
overflow: hidden;
}

div.psidebar-section-head {
div.psidebar div.section-head {
font-size: 12px;
padding: 5px 11px;
border-bottom: 2px solid #444;
}

div.psidebar-section-body {
div.psidebar div.section-body {
margin: 7px 11px 11px 11px;
}

div.psidebar-section-item {
div.psidebar div.section-item {
margin-bottom: 7px;
}

.psidebar-section-link {
div.psidebar .section-link {
font-size: 11px;
color: #666;
}

div.follower-list {
color: #666;
margin-top: 7px;
font-size: 11px;
}

+ 1
- 3
js/legacy/wn/page_layout.js Zobrazit soubor

@@ -10,11 +10,9 @@

*/

wn.sidebar_background = '#f2f2f2';
wn.PageLayout = function(args) {
$.extend(this, args)
this.wrapper = $a(this.parent, 'div', 'layout-wrapper',
{backgroundColor: wn.sidebar_background, padding: '0px'});
this.wrapper = $a(this.parent, 'div', 'layout-wrapper layout-wrapper-background');
this.main = $a(this.wrapper, 'div', 'layout-main-section');
this.sidebar_area = $a(this.wrapper, 'div', 'layout-side-section');
$a(this.wrapper, 'div', '', {clear:'both'});


+ 7
- 7
js/legacy/wn/widgets/page_sidebar.js Zobrazit soubor

@@ -14,7 +14,7 @@
wn.widgets.PageSidebar = function(parent, opts) {
this.opts = opts
this.sections = {}
this.wrapper = $a(parent, 'div', 'psidebar-wrapper')
this.wrapper = $a(parent, 'div', 'psidebar')

// refresh sidebar - make head and sections
this.refresh = function() {
@@ -34,7 +34,7 @@ wn.widgets.PageSidebar = function(parent, opts) {
}

this.make_head = function() {
this.head = $a(this.wrapper, 'div', 'psidebar-head', '', this.opts.title);
this.head = $a(this.wrapper, 'div', 'head', '', this.opts.title);
}
this.refresh();
@@ -46,9 +46,9 @@ wn.widgets.PageSidebar = function(parent, opts) {
wn.widgets.PageSidebarSection = function(sidebar, opts) {
this.items = [];
this.sidebar = sidebar;
this.wrapper = $a(sidebar.wrapper, 'div', 'psidebar-section');
this.head = $a(this.wrapper, 'div', 'psidebar-section-head', '', opts.title);
this.body = $a(this.wrapper, 'div', 'psidebar-section-body');
this.wrapper = $a(sidebar.wrapper, 'div', 'section');
this.head = $a(this.wrapper, 'div', 'section-head', '', opts.title);
this.body = $a(this.wrapper, 'div', 'section-body');
$br(this.wrapper, '5px');
this.opts = opts;

@@ -60,7 +60,7 @@ wn.widgets.PageSidebarSection = function(sidebar, opts) {
var item = this.opts.items[i];
if((item.display && item.display()) || !item.display) {
var div = $a(this.body, 'div', 'psidebar-section-item');
var div = $a(this.body, 'div', 'section-item');
this.make_one_item(item, div);
}
@@ -116,7 +116,7 @@ wn.widgets.PageSidebarLink = function(section, opts, wrapper) {
if(opts.icon) {
section.add_icon(this.wrapper, opts.icon);
}
this.ln = $a(this.wrapper, 'span', 'link_type psidebar-section-link', opts.style, opts.label);
this.ln = $a(this.wrapper, 'span', 'link_type section-link', opts.style, opts.label);
this.ln.onclick = function() { me.opts.onclick(me) };
}



+ 21
- 9
js/wn/ui/listing.js Zobrazit soubor

@@ -4,7 +4,9 @@
//
// opts:
// parent
// query or get_query
// method (method to call on server)
// args (additional args to method)
// query or get_query (will be deprecated)
// query_max
// no_result_message ("No result")
// page_length (20)
@@ -56,7 +58,7 @@ wn.widgets.Listing = function(opts) {
// make the toolbar
this.make_toolbar = function() {
if(!this.opts.hide_refresh) {
if(!(this.opts.hide_refresh || this.opts.no_refresh)) {
this.ref_img = $a(this.toolbar_area, 'span', 'link_type', {color:'#888'}, '[refresh]');
this.ref_img.onclick = function() { me.run(); }
@@ -151,18 +153,28 @@ wn.widgets.Listing = function(opts) {
this.start = 0;

// load query
this.query = this.opts.get_query ? this.opts.get_query() : this.opts.query;
this.add_limits();

args={ query_max: this.query_max || this.opts.query_max || '' }
args.simple_query = this.query;
if(!this.opts.method) {
this.query = this.opts.get_query ? this.opts.get_query() : this.opts.query;
this.add_limits();
var args={
query_max: this.query_max || this.opts.query_max || '',
as_dict: 1
}
args.simple_query = this.query;
} else {
var args = {
limit_start: this.start,
limit_page_length: this.page_length
}
}
args.as_dict = 1;
if(this.opts.args)
$.extend(args, this.opts.args)
// show loading
if(this.loading_img) $di(this.loading_img);
wn.call({
method:'webnotes.widgets.query_builder.runquery',
method: this.opts.method || 'webnotes.widgets.query_builder.runquery',
args: args,
callback: function(r, rt) { me.make_results(r, rt) },
no_spinner: this.opts.no_loading,


+ 1
- 1
py/build/bundle.py Zobrazit soubor

@@ -20,7 +20,7 @@ class Bundle:
if ':' in f:
f, suffix = f.split(':')
print f + ' | ' + str(int(os.path.getsize(f)/1024)) + 'k'
# print f + ' | ' + str(int(os.path.getsize(f)/1024)) + 'k'
# get data
with open(f, 'r') as infile:


Načítá se…
Zrušit
Uložit