Jump to content

Ошибка: Not Found /Ext/layout/container/Accordion.js


x11

Recommended Posts

При старте приложения в браузере и в логах на сервере получаю ошибку:

Quote

 ext-modern-all.js:20 GET http://localhost:8077/Ext/layout/container/Accordion.js?_dc=1643357290468 net::ERR_ABORTED 404 (Not Found)

Подскажите, что я делаю не так?

 

Если убрать загрузку этого файла (на картинке), то ошибки нет

http://forums.unigui.com/index.php?/topic/18182-accordion-layout-horizontal/&tab=comments#comment-100382

Я загружаю JS-файл в событии TUniServerModule.UniGUIServerModuleBeforeInit()

Screenshot_12.jpg

Screenshot_13.jpg

Link to comment
Share on other sites

13 minutes ago, x11 said:

Я загружаю JS-файл в событии TUniServerModule.UniGUIServerModuleBeforeInit()

 

16 minutes ago, x11 said:

Я загружаю JS-файл в событии TUniServerModule.UniGUIServerModuleBeforeInit()

Не загружайте там.

Link to comment
Share on other sites

Нет, настройки в ServerModule я не трогал. Ничего не менял.

И еще, я поискал файл "Accordion.js" в папке, где установлен фреймворк uniGUI и этого файла я не нашел

Screenshot_1.jpg

Link to comment
Share on other sites

procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
Var
 s: string;
begin
  UniGuiApplication.PfmtSettings.ThousandSeparator := ' ';
  AddIGrowl;
  s := UniServerModule.FilesFolderURL + cJsURLName + 'HorizontalAccordionUniPanel.js';
  CustomFiles.Add(s);
end;

отладчик показывает путь к файлу в переменной S

 

Quote

'files/js/HorizontalAccordionUniPanel.js'

 

мой файл есть

Screenshot_3.jpg

Link to comment
Share on other sites

3 hours ago, Sherzod said:

Не загружайте там.

Может вы не обратили внимание на первый скрин в первом сообщении, но напишу на всякий случай, что ошибка только при загрузке мобильной версии.

Screenshot_6.jpg

Link to comment
Share on other sites

В общем, я сделал так:

 

procedure TUniMainModule.LoadScriptCSS;
begin
  if UniMainModule.IsMobilePlatform then
  begin
    UniSession.AddJS('Ext.Loader.loadScript("/files/' + constCssUrlName + constMobileCss + '")');
    UniSession.AddJS('Ext.Loader.loadScript("/files/' + constCssUrlName + constMobileHideCss + '")');// скрывать элементы
  end
  else
  begin// файлы для десктопной версии
    UniSession.AddJS('Ext.Loader.loadScript("/files/' + constCssUrlName + constDesktopCss + '")');
    UniSession.AddJS('Ext.Loader.loadScript("/files/' + constCssUrlName + constDesktopHideCss + '")');// скрывать элементы
    UniSession.AddJS('Ext.Loader.loadScript("/files/' + cJsURLName + 'HorizontalAccordionUniPanel.js' + '")');
  end;
end;


procedure TUniMainModule.UniGUIMainModuleBeforeLogin(Sender: TObject; var Handled: Boolean);
begin
  LoadScriptCSS;
end;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...