JLynch7 / SlickGrid

A lightning fast JavaScript grid/spreadsheet
https://github.com/jlynch7/SlickGrid/wiki
MIT License
89 stars 76 forks source link

both calendar.gif and tick.png can't be visible when the html page is not under /examples #32

Closed lingyulin closed 11 years ago

lingyulin commented 12 years ago

both calendar.gif and tick.png can't be visible when the html page is not under /examples/,for examples move the example3-editing.html under directory /examples/newpath/ I fixed the problom with that: 1、change /slick.formatters.js like that ... var slickgrid_formatters_jspath=document.scripts; slickgrid_formatters_jspath=slickgrid_formatters_jspath[slickgrid_formatters_jspath.length-1].src.substring(0,slickgrid_formatters_jspath[slickgrid_formatters_jspath.length-1].src.lastIndexOf("/")+1);

function CheckmarkFormatter(row, cell, value, columnDef, dataContext) { return value ? "" : ""; } ... 2、change /slick.editors.js like that this.init = function () { ... var slickgrid_formatters_jspath=document.scripts; slickgrid_formatters_jspath=slickgrid_formatters_jspath[slickgrid_formatters_jspath.length-1].src.substring(0,slickgrid_formatters_jspath[slickgrid_formatters_jspath.length-1].src.lastIndexOf("/")+1);

  $input.datepicker({
    ...
    buttonImage: slickgrid_formatters_jspath + "images/calendar.gif",
   ...
};
...
JLynch7 commented 11 years ago

The examples aren't meant to be portable. You should submit this issue to mleibman's repo if you feel strongly about it.